示例示例CSS常用样式包括:字体样式:
CSS常用样式包括:
1. 字体样式:
css
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold;
font-style: italic;
text-decoration: underline;
color: #000000;
2. 背景样式:
css
background-color: #ffffff;
background-image: url(bg.jpg);
background-repeat: repeat-x;
background-position: top left;
background-attachment: fixed;
3. 边框样式:
css
border-style: solid;
border-width: 1px;
border-color: #000000;
border-radius: 5px;
4. 定位样式:
css
position: relative;
top: 10px;
left: 20px;
right: 30px;
bottom: 40px;
z-index: 5;
5. 尺寸样式:
css
width: 100px;
height: 200px;
min-width: 300px;
max-width: 400px;
min-height: 500px;
max-height: 600px;
6. 间距样式:
css
margin: 10px;
margin-top: 20px;
margin-right: 30px;
margin-bottom: 40px;
margin-left: 50px;
padding: 10px;
padding-top: 20px;
padding-right: 30px;
padding-bottom: 40px;
padding-left: 50px;
7. 显示样式:
css
display: block;
visibility: visible;
opacity: 0.5;
float: left;
clear: both;
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(1条)