zoukankan      html  css  js  c++  java
  • css图片的相关操作

    css图片的相关操作

    1、案例源码

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    *{margin: 0;padding: 0}
    body{ 95.2%;margin: 5px auto;}
    .image{border: 1px solid darkgray; auto;height: auto;float: left;text-align: center;margin: 5px;}
    .image p{font-size: 12px;margin-bottom: 4px;}
    .image a img{padding: 3px;opacity: 0.92}/*padding和margin都可以实现同样效果*/
    .image a img:hover{opacity: 1;}
    .image a:hover{background-color: coral;}
    </style>
    </head>
    <body>
    <div class="image">
    <a href="#"><img src="images/f1.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f2.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f3.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f4.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f5.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f6.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f7.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f1.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f2.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f1.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f2.jpg"/></a>
    <p>美景</p>
    </div>
    <div class="image">
    <a href="#"><img src="images/f3.jpg"/></a>
    <p>美景</p>
    </div>
    </body>
    </html>

    2、案例效果

  • 相关阅读:
    C 语言定义
    一次系统磁盘异常使用100%的处理
    supervisord 安装、配置体验
    uva 211(dfs)
    poj1651
    有一种感动叫ACM(记WJMZBMR在成都赛区开幕式上的讲话)
    nyoj-746
    Codeforces Round #308 (Div. 2)----C. Vanya and Scales
    long long 与 _int64
    石子归并问题(nyoj737)
  • 原文地址:https://www.cnblogs.com/qikeyishu/p/7392354.html
Copyright © 2011-2022 走看看