内容搜索
热门内容
推荐内容
最新内容
提出意见和建议

CSS Horizontal 规则


默认HR标记是中间对齐,
下面是其他规则

Align Left

hr {width: 50%;
text-align: left;/*this will align it for IE*/
margin: 0 auto 0 0; /*this will align it left for Mozilla*/
}

Align Right

hr {width: 50%;
text-align: right;/*this will align it for IE*/
margin: 0 0 0 auto; /*this will align it right for Mozilla*/
}

Borders

Now lets add a 1px border on the top of the hr. For IE you need to give the hr a height of whatever the total height of the borders will be. So if you give thehra border of 1px on all sides the height will need to equal 2px.

hr {border: none 0;
border-top: 1px dashed #000;/*the border*/
width: 50%;
height: 1px;/*whatever the total width of the border-top and border-bottom equal*/
}


 
点这里复制本页地址发送给您QQ/MSN上的好友
相关文章

css2快速参考

相关评论


本文章所属分类:首页 文档 w3c css