border-style:dotted solid double dashed;
上边框是点状
右边框是实线
下边框是双线
左边框是虚线
规定元素的顶部边缘
auto 默认值。通过浏览器计算上边缘的位置。
% 设置以包含元素的百分比计的上边位置。可使用负值。
length 使用 px、cm 等单位设置元素的上边位置。可使用负值。
inherit 规定应该从父元素继承 top 属性的值。
元素中的文本的水平对齐方式
left 把文本排列到左边。默认值:由浏览器决定。
right 把文本排列到右边。
center 把文本排列到中间。
justify 实现两端对齐文本效果。
inherit 规定应该从父元素继承 text-align 属性的值。
外边距。
margin-left和margin-right都设为auto时,可以水平的居中,但对浮动元素或绝对定位元素无效。
定义元素在哪个方向浮动
并排放置两个带边框的框
box-sizing:border-box;
颜色
CSS 背景色
<h1 style="background-color:DodgerBlue;">China</h1>
<p style="background-color:Tomato;">China is a great country!</p>
CSS 文本颜色
<p style="color:DodgerBlue;">China is a great country!</p>
CSS 边框颜色
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
CSS 颜色值
<h1 style="background-color:rgb(255, 99, 71);">...</h1>
<h1 style="background-color:#ff6347;">...</h1>
<h1 style="background-color:hsl(9, 100%, 64%);">...</h1>
<h1 style="background-color:rgba(255, 99, 71, 0.5);">...</h1>
<h1 style="background-color:hsla(9, 100%, 64%, 0.5);">...</h1>
transform
旋转,缩放,倾斜或平移给定元素
overflow
定义溢出元素内容区的内容会如何处理
px,em,rem,%
CSS单位