CSS基础--1

2016-11-09  本文已影响8人  Czw_hacker

css

css作用

css分类

优先级

行内 > 内嵌 > 外部

style= “样式属性1:值1;样式属性2:值2;…”
<head>
<meta charset="UTF-8">
<title>Title</title>
    <style>
        ...
    </style>
</head>
<link href="stylesheet.css"  rel="stylesheet" type="text/css" />

语法

1.png

选择器

name{…}

文本CSS

font -family:sans-serif,微软雅黑;
color:red;
font -size:14px;
font -size:1em;
font -style:italic;
font -style: oblique;
font -style:normal;
font -weight:bold;
font -weight:normal;
text -transform:uppercase;
text -transform:lowercase;
text -transform:capitalize;
text -decoration:underline;
text -decoration:overline;
text -decoration:line-through;
text -decoration:none;
text -decoration:underline overline line-through;
letter -spacing:2px;
letter -spacing:-5px;
word-spacing:4px;
line-height:20px;
line-height:1.5;
line-height:150%;
text -align:left;
text -align:center ;
text -align:right;
p:first -letter {}
p:first -line {}
text -indent:2em;

列表样式

样式

disk 实心圆
circle 空心圆
square 实心方形
decimal 十进制
decimal-leading-zero 十进制前置零
upper -alpha 大写字母
lower -alpha 小写字母
upper -roman 大写罗马字母
lower -roman 小写罗马字母

ul {list -style-type: square}

项目符号位置

list -style-position:outside;
list -style-position:inside;

图片项目符号

list -style-image:url(img/1.png)
上一篇 下一篇

猜你喜欢

热点阅读