温馨提示:以下所有案例都是选用内部样式的方法来引入css代码的哦!请慢慢享用~~
属性 | 属性值 | 描述 |
---|---|---|
position | relative | 设置元素定位方式为相对定位 |
absolute | 设置元素定位方式为绝对定位 |
补:相对定位的间距设置使用的是 上边距 margin-top ,下边距 margin-bottom ,左边距 margin-left ,右边距 margin-right ,复合设置 margin。而绝对定位的间距设置没有margin,直接使用left,right,top,bottom。
属性 |
属性值 | 描述 |
---|---|---|
font-family |
例如:黑体,隶书,楷书,Conrier New等等 | 设置文字字体样式 |
font-size | (绝对尺寸/关键字/相对尺寸/百分比) 例(30px/large/0.1cm/10%) 关键字包括:xx-small(极小),x-small(较小),smaller,small(小),medium(标准),large(大) |
设置字体大小 |
font-style | normal、italic、oblique |
正常显示字体、斜体字、倾斜角度大一点 |
font-weight |