css编写一个自适应的博客页面效果代码

代码语言:html

所属分类:响应式

代码描述:css编写一个自适应的博客页面效果代码

代码标签: 适应 博客 页面 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Lato:300,400,700|Poiret+One' rel='stylesheet' type='text/css'>
  
  
  
<style>
/* Base Styles */

body{
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.4em;
	color: #222;
	background: #474747;
	font-family: 'Lato', sans-serif;
}

img{
	max-width: 100%;
	height: auto;
	border-radius: 3px;
}

a{
	text-decoration: none;
	color: inherit;
}

/* Grid */

.section {
	clear: both;
	padding: 0;
	margin: 0;
}

.col {
	display: block;
	float:left;
	margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; }

.span_3_of_3 {
	width: 100%;
}
.span_2_of_3 {
	width: 66.1%;
}
.span_1_of_3 {
	width: 32.2%;
}

/* Header & Navigation */

header{
	max-width: 100%;
	background: #222; /*FallBack*/
	background: rgba(0,0,0,.6);
	padding: 20px;
}

nav{
	width: 100%;
	margin-bottom: 1em;
	background: #323232;
	font-family: 'Poiret One', cursive;
}

.logo{
	text-align: center;
	color: #fff;
	font-size: 3em;
	font-weight: 400;
	font-family: 'Poiret One', cursive;
}

ul{
	padding: 0;
	margin: 0;
	overflow: hidden;
	color: #fff;
	text-align: center;
	-webkit-transition: max-height 0.5s;
	transition: max-height 0.5s;
}

.nav-item{
	display: inline-block;
	padding: 20px;
	font-size: 1.4em;
	-webkit-transition: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0