上篇文章主要讲述了CSS样式更改中的背景Background,这篇文章咱们来谈谈字体设置Font&边框Border的基础用法。网络
<div style='font-family: sans-serif normal'></div> 可用字体: Serif Sans-serif Monospace Cursive Fantasy Times Courier
<div style='font-style:normal'></div> 文本倾斜: normal 文本正常显示 italic 文本斜体显示 oblique 文本倾斜显示
<div style='font-variant:small-caps'></div> normal 显示标准字体。 small-caps 显示小型大写字母的字体。
<div style='font-weight:normal'></div> normal 标准的字符 bold 粗体字符 bolder 更粗的字符 lighter 更细的字符 也能够使用数字表示,范围为100~900
<div style='font-size:60px'></div> smaller 变小 larger 变大 length 固定值 并且还支持百分比
首先说一下边框风格,它的风格比较多,经常使用的通常是实线为主:学习
<div style='border-style:none'></div> hidden 隐藏边框 dotted 点状边框 dashed 虚线边框 solid 实线边框 double 双线边框 groove 3D凹槽边框 ridge 3D垄状边框 inset 3D inset边框 outset 3D outset边框 边框也有四面,因此也会有上下左右 因此有时候为了更精肯定位并修改样式能够使用: border-top-style 上边框样式 border-right-style 右边框样式 border-bottom-style 下边框样式 border-left-style 左边框样式
先定义边框的宽度 风格和颜色,而后定义边框的其它属性。字体
<div style='border-radius:25px;'></div>
2).边框阴影网站
<div style='box-shadow:1px 2px 2px 2px red'></div> 参数含义: 边框各个方向的大小和颜色
3).边框图片url
<div style='border-image:url(1.png) 30 30 10 round'></div> 参数含义: 边框图片的路径 图片边框向内偏移 图片边框的宽度 边框图像区域超出边框的量 图像边框是否应平铺(repeated)、铺满(rounded)或拉伸(stretched)。
这篇文章主要介绍了CSS样式更改篇中的字体设置Font&边框Border设置,但愿让你们对CSS选择器有个简单的认识和了解。
看完本文有收获?请转发分享给更多的人spa
IT共享之家code
想要学习更多,请前往Python爬虫与数据挖掘专用网站:http://pdcfighting.com/
想学习更多Python网络爬虫与数据挖掘知识,可前往专业网站:http://pdcfighting.com/orm