码迷,mamicode.com
首页 > Web开发 > 详细

css样式

时间:2019-04-26 21:05:15      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:styles   ack   color   需要   ref   背景图   ati   样式   position   

一 外部样式表
不需要 style 标签
<link rel=“stylesheet” href=“” />
二 嵌入式样式表
<style type=“text/css”>
p{}
</style>
三 内联样式
属性名为 style
举例:<p style=“”></p>

选择器

一 元素选择器

例子:标签{}或者  标签1,标签2{}

二 类选择器

例子 : .类名{属性}

三 ID选择器

例子:#ID名{属性}

常用css属性

一 文本属性

font-family 字体名称

font-size 字体大小

font-style 字体风格

color 字体颜色

text-decoration 字体装饰

text-align 文本对齐属性

二 背景属性

background-color 背景颜色

background-img 背景图标

三 布局属性

float 浮动属性

clear 是否允许漂浮

display 能否显示

visibility 可见性 

四  列表属性

list-style-type  列表样式与属性

list-style-position 列表样式 位置属性

list-style-image 自定义列表图片

css样式

标签:styles   ack   color   需要   ref   背景图   ati   样式   position   

原文地址:https://www.cnblogs.com/user001/p/10776371.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!