Css常用操作——————图片
2016-05-13 22:43
417 查看
body{ background-color: #0078b3; } .image{ border: 1px solid darkgray; width: auto; height: auto; float: left; text-align: center; margin: 5px; } img{ margin: 5px; opacity: 1; } .text{ font-size: 12px; margin-bottom: 5px; } a:hover{ background-color: aqua; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>图片</title> <link href="style.css" type="text/css" rel="stylesheet"> </head> <body> <div class="image"> <a href="#" target="_self"> <img src="2.jpg" alt="背景" width="200px" height="200px"> </a> <div class="text">一张背景图</div> </div> <div class="image"> <a href="#" target="_self"> <img src="2.jpg" alt="背景" width="200px" height="200px"> </a> <div class="text">一张背景图</div> </div> <div class="image"> <a href="#" target="_self"> <img src="2.jpg" alt="背景" width="200px" height="200px"> </a> <div class="text">一张背景图</div> </div> <div class="image"> <a href="#" target="_self"> <img src="2.jpg" alt="背景" width="200px" height="200px"> </a> <div class="text">一张背景图</div> </div> </body> </html>
相关文章推荐
- Web布局连载——两栏固定布局(五)
- [div+css]晒晒最新制作专题推广页模板
- 盒子模型
- CSS选择器
- CSS样式优先权
- [css] line-height 百分比单位和数值单位的区别
- Apple官网研究之使用Justify布局导航
- 关于前端的思考与感悟
- 设计更快的网页(三):字体和 CSS 调整
- 通晓网络测试常用命令
- 纯CSS制作的新闻网站中的文章列表
- 10条影响CSS渲染速度的写法与使用建议第1/3页
- BS项目中的CSS架构_仅加载自己需要的CSS
- 很不错的 CSS Hack 又学了一招
- 发一个css比较清爽的写法
- CSS expression控制图片自动缩放效果代码[兼容 IE,Firefox]
- css布局网页水平居中常用方法
- CSS经典技巧十则第1/2页
- css 兼容性问题this.style.cursor=''hand''