zoukankan      html  css  js  c++  java
  • CSS实例:图片导航块

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>img</title>
        <link rel="stylesheet" type="text/css"href="jjj.css">
    </head>
    <body>
    
        <div>
            <div class="img">
                <a href="http://pal4.roogames.com/">
                    <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_d_22.jpg"></a>
                <div class="desc"><a href="http://pal4.roogames.com/">慕容紫英</a></div>
           </div>
            <div class="img">
            <a href="http://pal4.roogames.com/">
                <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_d_23.jpg">
            </a>
            <div class="desc"><a href="https://baike.baidu.com/item/%E4%BA%91%E5%A4%A9%E6%B2%B3/11894?fr=aladdin">云天河</a> </div>
        </div>
            <div class="img">
            <a href="http://pal4.roogames.com/">
                <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_24.jpg">
            </a>
            <div class="desc"><a href="http://pal4.roogames.com/">柳梦璃</a> </div>
        </div>
            <div class="img">
            <a href="http://pal4.roogames.com/">
                <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_03.jpg">
            </a>
            <div class="desc"><a href="http://pal4.roogames.com/">韩菱纱</a> </div>
        </div>
    
    
    </div>
    
    
    
    
    
    <div class="clearfloat">
          <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_d_22.jpg">
          <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_d_23.jpg">
          <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_24.jpg">
          <img src="http://pal4.roogames.com/pal4/pal4index_files/pic/pic_03.jpg">
    
    </div>
    </body>>
    </html>
     img{
         300px;
    }
    div.img{
        border: 1px solid seagreen;
         180px;
        float: left;
        margin: 5px;
    }
    div.img img{
         100%;
        height: auto;
    }
    div.desc{
        text-align: center;
        padding: 5px;
    }
    div.img:hover{
        border:1px solid blue;
    }
    .clearfloat{
        clear: both;
    
    }

  • 相关阅读:
    关于FPGA设计16位乘法器的两…
    const&nbsp;int&nbsp;*pi与int&amp;nbs…
    HTML5基础学习
    html5基础!!
    正确分析结构使用正确的HTML标签。CSS样式写一起。
    开发经验以及方法
    布局设计
    position定位
    浏览器的兼容性
    float浮动的世界
  • 原文地址:https://www.cnblogs.com/0055sun/p/7699375.html
Copyright © 2011-2022 走看看