Rumah > hujung hadapan web > tutorial css > html和csss实现简单博客代码分享

html和csss实现简单博客代码分享

小云云
Lepaskan: 2018-02-28 09:38:06
asal
2290 orang telah melayarinya

本文主要和大家分享html和csss实现简单博客代码,希望能帮助大家用HTML和css完成一个简单的博客。

过度动画

-webkit-transition: color 200ms;
  -o-transition: color 200ms;
  transition: color 200ms;
Salin selepas log masuk

阴影

-webkit-box-shadow: 0 0 3px 2px rgba(0,0,0,.2);
box-shadow: 0 0 3px 2px rgba(0,0,0,.2);

css代码

.side-bar{  float: left;  width: 20%;}.main{  float: right;  width: 80%;  color: #555;}a{  text-decoration: none;}
 a ,body{  color: #eee;}body{  background: #454545;  line-height: 1.5;}.header .logo{  padding: 10px 20px;  font-size: 30px;  display: inline-block;  border: 5px solid #eee;  margin-bottom: 10px;  line-height: 1;}.side-bar > *{  padding: 10px 15px;}.side-bar .nav a,.side-bar .tag-list a{  display: block;  padding: 5px;  color: #777;}.side-bar .nav a:hover,.side-bar .tag-list a:hover{  transition:

  color: #eee;}.side-bar .nav a,.side-bar .tag-list a{  font-weight: 700;}.article-list{  margin-right: 30%;  background: #fff;  padding: 20px 30px;}.article-list .item .title{  font-size:  22px;  font-weight: 700;  color: #454545;}.article-list .item .status{  font-size: 17px;  color: #ccc;}.article-list .item>*{  margin:  10px 0px;}.article-list .item{  margin-bottom: 20px;}
Salin selepas log masuk

html代码

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="http://cdn.bootcss.com/normalize/5.0.0/normalize.min.css">
  <link rel="stylesheet" href="css/main.css">
  <title>王花花</title>
</head>
<body>
  <p class="side-bar">
    <p class="header">
      <a href="index.html" class="logo">王花花</a>
      <p class="intro">Lorem ipsum dolor sit amet dolor sit ame.</p>
    </p>
    <p class="nav">
      <a href="#" class="item">关于我</a>
      <a href="#" class="item">联系我</a>
      <a href="#" class="item">捐助我</a>
    </p>
    <p class="tag-list">
      <a href="#" class="item"># 夸夸我</a>
      <a href="#" class="item"># 抱抱我</a>
      <a href="#" class="item"># 亲亲我</a>
    </p>
  </p>
  <p class="main">
    <p class="article-list">
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
      <p class="item">
        <a href="article.html" class="title">Lorem ipsum dolor sit amet dolor sit</a>
        <p class="status">发布于:2050-10-01 | 阅读:3500 | 标签:#两性 #HTML</p>
        <p class="content">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore nemo ea, magnam qui incidunt maxime commodi eveniet quam soluta, deserunt molestiae officiis adipisci assumenda, rerum, exercitationem architecto natus nihil quia.
        </p>
      </p>
    </p>
  </p>
</body>
</html>
Salin selepas log masuk

 相关推荐:

博客内容管理系统详解

如何PHP制作简易博客

HTML5和CSS3扁平化风格博客教程的资源分享

Atas ialah kandungan terperinci html和csss实现简单博客代码分享. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan