zoukankan      html  css  js  c++  java
  • html5+css3 文章的展示demo

    index.html   页面的样式

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>little demo</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
    <meta name="author" content="lijiageng">
    <meta name="description" content="h5 测试的小demo ">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    <body>
    <div class="article">
    <article>
    <img src="images/article01.png"/>
    <h2><a href="blog.html">Lorem ipsum dolor amet consectetur adipiscing elit</a></h2>
    <span class="info">By Admin on December 01, 2012 with <a href="#">01 Commnets</a></span>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam viverra convallis auctor. Sed accumsan libero quis mi commodo et suscipit enim lacinia. Morbi rutrum vulputate est sed faucibus. Nulla sed nisl mauris, id tristique tortor. Sed iaculis dapibus urna nec dictum. Proin non enim odio. [...]</p>
    </article>
    <article>
    <img src="images/article02.png"/>
    <h2><a href="blog.html">Sed accumsan libero quis mi commodo et suscipit</a></h2>
    <span class="info">By Admin on December 01, 2012 with <a href="#">01 Commnets</a></span>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam viverra convallis auctor. Sed accumsan libero quis mi commodo et suscipit enim lacinia. Morbi rutrum vulputate est sed faucibus. Nulla sed nisl mauris, id tristique tortor. Sed iaculis dapibus urna nec dictum. Proin non enim odio. [...]</p>
    </article>
    </div>
    <div id="box">
    <div class="heading">
    <p>Sponsors</p>
    </div>
    <div class="content">
    <img src="images/themeforest.jpg">
    <img src="images/zerotheme.jpg">
    </div>
    </div>
    <div id="box">
    <div class="heading">
    <p>Photos</p>
    </div>
    <div class="content">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    <img src="images/photo01.png">
    </div>
    </div>
    </body>
    </html>

    style.css  

    a{
    text-decoration: none;
    }


    .article{margin-bottom: 20px;}
    .article article{auto;height:auto;margin-bottom: 20px;border:1px solid #CCC;padding: 8px 10px;overflow:hidden;background: url("../images/bgbox.png") repeat-x;}
    .article article img{border:1px solid #CCC;margin-right: 20px;float: left;}
    .article article h2{font-weight: bold; font-style: italic;overflow:hidden;}
    .article article h2 a{color:#888888;}
    .article article span{margin-bottom: 20px;margin-top: 20px;display: block;}
    .article article p{font-size: 1em;color: gray;font-family:Serif;}

    #box{margin-bottom: 20px;margin-top: 20px;}
    #box .heading{padding: 8px 10px;border:1px solid #CCC;background: url("../images/bgheading.png") repeat-x;}
    #box .heading p{font-size:22px; font-weight:normal;display:inline;}
    #box .content{padding: 20px;border-left:1px solid #CCC;border-right:1px solid #CCC;border-bottom:1px solid #CCC; background: url("../images/bgbox.png") repeat-x;}

  • 相关阅读:
    zabbix添加Tomcat监控
    Jenkins发布
    Linux : 从私钥中提取公钥
    记一次拆机除尘换硅脂的经历,第一次拆机幸好没拆坏,心真大-_-!
    超简单让ubuntu开启wifi热点(亲测16.04与14.04可用)
    一起动手打造个人娱乐级linux
    python数据结构之链表(一)
    华为OJ机试题目:两个大整数相乘(纯C语言实现两个大整数相乘,两种方法实现大数相乘)
    C语言学习笔记---好用的函数memcpy与memset
    个人关于python装饰器的白痴理解
  • 原文地址:https://www.cnblogs.com/lijiageng/p/6285554.html
Copyright © 2011-2022 走看看