zoukankan      html  css  js  c++  java
  • CSS实现鼠标放图片上显示白色边框+文字描写叙述

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>鼠标悬停时显示图片边框和文字描写叙述的图片特效</title>
    <style type="text/css">
    body{margin: 0;padding: 0;font: normal 10px Verdana, Arial, Helvetica, sans-serif;line-height: 1.8em;background: #1d1d1d url(bg.jpg) repeat;}
    a{color:#999;}
    h1{font-family:Georgia, "Times New Roman", Times, serif;text-align: center;font-weight: normal;font-size: 4em;line-height: 1.2em;margin: 0; padding: 20px 0;color:#999;font-size:18px;}
    img{border: none;}
    ul.gnineh{ 960px;list-style: none;margin: 0 auto; padding: 0;}
    ul.gnineh li{ 220px;float: left; display: inline;margin: 10px; padding: 0;position: relative;}
    ul.gnineh li:hover{z-index: 99;}
    ul.gnineh li img{position: relative;filter: alpha(opacity=30);opacity: 0.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";}
    ul.gnineh li:hover img{z-index: 999;filter: alpha(opacity=100);opacity: 1;-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";}
    ul.gnineh li .info{position: absolute;left: -10px; top: -10px;padding: 210px 10px 20px; 220px;display: none;background: #fff;font-size: 1.2em;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}
    ul.gnineh li:hover .info{display: block;}
    ul.gnineh li h2{font-size: 1.2em;font-weight: normal;text-transform: uppercase;margin: 0; padding: 10px 0;}
    ul.gnineh li p{padding: 0; margin: 0; font-size: 0.9em;}
    body{font-size:12px;font-family:'Arial';line-height:25px;}
    #header{background:#000;height:30px;line-height:30px;margin-bottom:20px;}
    #header h2{float:left;margin:0px 10px;}
    #header h2 a{color:#fff;}
    #main{950px;margin:0px auto}
    .code{border:#ccc 1px solid;background:#ffffcc;padding:10px;}
    </style>
    </head>
    <body>
    <div><A href="http://www.999jiujiu.com/">http://www.999jiujiu.com/</A></div>
    <h1>纯CSS实现的鼠标触及显示边框和描写叙述的图片特效</h1>
    <ul class="gnineh">
    <li><a href="/"><img src="wall_s3.jpg" alt=""></a><div class="info"><h2>漂亮荃银高科</h2><p>新车上市堪比波音。

    </p></div></li>
    <li><a href="/"><img src="wall_s4.jpg" alt=""></a><div class="info"><h2>我的小狗</h2><p>非常可爱的猩猩</p></div></li>
    <li><a href="/"><img src="wall_s5.jpg" alt=""></a><div class="info"><h2>穿过市区</h2><p>是郊外的清凉</p></div></li>
    <li><a href="/"><img src="wall_s6.jpg" alt=""></a><div class="info"><h2>梦中情人</h2><p>回首一眸万物俱焚</p></div></li>
    </ul>
    </body>
    </html>

  • 相关阅读:
    51nod 1087 1 10 100 1000(找规律+递推+stl)
    51nod 1082 与7无关的数 (打表预处理)
    51 nod 1080 两个数的平方和
    1015 水仙花数(水题)
    51 nod 1003 阶乘后面0的数量
    51nod 1002 数塔取数问题
    51 nod 1001 数组中和等于K的数对
    51 nod 1081 子段求和
    51nod 1134 最长递增子序列 (O(nlogn)算法)
    51nod 1174 区间中最大的数(RMQ)
  • 原文地址:https://www.cnblogs.com/zhchoutai/p/6805328.html
Copyright © 2011-2022 走看看