基础知识

标准盒子模型 content padding margin border     IE 盒子模型的 content 部分包含了 border 和 pading。

避免触发IE盒模型的方法是使用<!DOCTYPE html>声明,告诉IE采用W3C盒子模型即可

 

行内元素 a b span img input strong select label em button textarea
块级元素 div ul li dl dt dd p h1-h6 blockquote
空元素 br meta hr link input img

href 是指向网络资源所在位置 建立和当前元素(锚点)或当前文档(链接)之间的链接,用于超链接
src 是指向外部资源的位置,指向的内容将会嵌入到文档标签所在位置;在请求

 


css 实现垂直剧居中

<div class=""wrapper>
<div class="content"></div>
</div>

<style>
.wrapper{
position:relative;
width:500px;
height:500px;
background-color:#ddd;
}
.content{
position:absolute;
width:200px;
height:200px;
background-color:#eee;
top:50%;
left:50%;
margin-top:-100px;
margin-left:-100px
}
</style>

posted @ 2017-08-24 18:19  萧大师  阅读(133)  评论(0编辑  收藏  举报