CSS样式部分总结

标签显示模式(display)
display:标签显示模块转换
inline:块类标签转行内标签
block:行内标签转块类标签
inline-block:块、行内标签转为行内块标签

CSS padding 属性
CSS padding 属性定义元素的内边距。padding 属性接受长度值或百分比值,但不允许使用负值。
单边内边距属性
也通过使用下面四个单独的属性,
padding-top
padding-right
padding-bottom
padding-left

CSS 背景
背景色:可以使用 background-color 属性为元素设置背景色。
背景图像:要把图像放入背景,需要使用 background-image 属性。
背景平铺:如果需要在页面上对背景图像进行平铺,可以使用 background-repeat 属性。
背景定位:可以利用 background-position 属性改变图像在背景中的位置。
背景定位关键字:center center center
top top center 或 center top
bottom bottom center 或 center bottom
right right center 或 center right
left left center 或 center left
背景滑轮:如果文档比较长,那么当文档向下滚动时,背景图像也会随之滚动。当文档滚动到超过图像的位置时,图像就会消失。通过 background-attachment 属性防止这种滚动。
CSS背景属性:background 简写属性,作用是将背景属性设置在一个声明中。
background-attachment 背景图像是否固定或者随着页面的其余部分滚动。
background-color 设置元素的背景颜色。
background-image 把图像设置为背景。
background-position 设置背景图像的起始位置。
background-repeat 设置背景图像是否及如何重复。

CSS定义边框样式:
border-top-style
border-right-style
border-bottom-style
border-left-style

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章