day3 css常用属性
一、常用样式属性
<!-- 1、常用样式属性
1、fontsize 字体大小
2、color 字体颜色,颜色值 ,颜色英文单词red十六进制颜色值(#FFB6C1)rgb颜色(255,0,0)
rgba颜色(255,0,0,0.3)
3、font-family 字体名称, font-family:字体1,字体2,字体3;
4、font-weight 字体粗细,值是100-900
5、font-style 文字倾斜, italic/oblique/normal(取消倾斜,常规显示);
6、text-align 水平对齐方式,text-align:left/right/center
7、line-height:normal/value
8、text-decoration:none/underline/overline/line-through 文本修饰
none:没有修饰
underline:添加下划线
overline:添加上划线
line-through:添加删除线
9、letter-spacing 字体间距
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
#p1{
font-size: 28px;
color: rgb(155,190,8);
font-family: "黑体","宋体","楷体";
font-weight:900;
}
</style>
</head>
<body>
</body>
</html>
二、边框属性
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
p{
width: 200px;
height: 100px;
background-color: yellow;
/*1、 同时设置四条边的边框
border : 边框宽度 边框样式 边框颜色
*/
/* border: 3px dotted red; */
/* 2、单独设置一条边
border-left:边框宽度 边框样式 边框颜色
border-right:边框宽度 边框样式 边框颜色
border-top:边框宽度 边框样式 边框颜色
border-buttom:边框宽度 边框样式 边框颜色
*/
border-bottom: 10px dotted skyblue;
/* 3、设置圆角 */
/* border-radius: 20px; */
border-top-left-radius: ;
}
</style>
</head>
<body>
<p>我是段落一</p>
</body>
</html>