第五章
1.编辑网页文本
字体样式
属性名 含义 举例
font-family 设置字体类型 font-family:“隶书”;
font-size 设置字体大小 font-size:12px;
font-style 设置字体风格 font-style:italic;
font-weight 设置字体的粗细 font-weight:bold;
font 在一个声明中设置所有字体属性 font:italic bold 36px “宋体”;
文本属性
属性 含义 举例
color 设置文本颜色 color:#00C;
text-align 设置元素水平对齐方式 text-align:right;
text-indent 设置首行文本的缩进 text-indent:20px;
line-height 设置文本的行高 line-height:25px;
text-decoration 设置文本的装饰 text-decoration:underline;
vertical-align 设置垂直对齐方式 vertical-align:middle;
text-shadow 设置文本阴影 text-shadow : color x-offset y-offset blur-radius;
2.使用CSS的超链接样式设置伪类超链接在不同状态下的样式
语法:
a:hover {
color:#B46210;
text-decoration:underline;
}
//标签名:伪类名{声明;}
伪类名称 含义 示例
a:link 未单击访问时超链接样式 a:link{color:#9ef5f9;}
a:visited 单击访问后超链接样式 a:visited {color:#333;}
a:hover 鼠标悬浮其上的超链接样式 a:hover{color:#ff7300;}
a:active 鼠标单击未释放的超链接样式 a:active {color:#999;}
设置伪类的顺序:a:link->a:visited->a:hover->a:active
3.列表样式list-style属性
值 说明 语法示例
none 无标记符号 list-style:none;
disc 实心圆,默认类型 list-style:disc;
circle 空心圆 list-style:circle;
square 实心正方形 list-style:square;
decimal 数字 list-style:decimal
4.背景样式
背景属性
背景颜色(background-color)
背景图像(background-image)
背景定位(background-position)
<style>
h2 {
font-size: 18px;
font-family: "楷体";
}
p {
font: 12px "Times New Roman", "Times", "宋体";
line-height: 20px;
}
p span {
font-weight: bold;
color: #F00;
}
</style>
<body>
<h2> 全部歌手 </h2>
<p><span>A</span>
A Fine Frenzy Air Supply Akon Alan Silvestri
Apink 安又琪 安在旭 安室奈美惠
</p>
<p> <span>B</span>
Babyface Backstreet .. Bandari Barbra Streisand Basshunter Bee Gees
北京天使合唱团 宝儿 宝宝的音乐花园 巴哈尔古丽 巴桑 布仁巴雅尔
</p>
<p><span>C</span>
Chris Garneau Christina Aguilera Christina Perri
草原兄妹
蔡卓妍 蔡国庆
陈雅森 陈雷 陈韵若
</p>
<p> <span>D</span>
Darby Devon Darren Darren Hayes Daughtry David Archuleta
Dido
东城卫 东方传奇
刀郎 刁寒 动力火车 邓丽欣
</p>
<p> <span>E</span>
Emmylou Harris Enigma Ennio Morricone
Eric Clapton
eminem 二手玫瑰 二胡 额尔古纳乐队
</p>
<p> <span>F</span>
Fergie Finger eleven Flo Rida Florence + The M..
付笛声 付辛博 佛涯组合
凤凰传奇 飞儿乐团
</p>
<p><span>G</span>
Gretchen Wilson Greyson Chance Groove Coverage 关牧村 关菊英 古天乐 古巨基 龚琳娜 龚诗嘉
</p>
<p><span>H</span>
High School Music.. Hilary Duff >Hit-5 Hollywood Undead Hope组合 胡松华 胡歌 黄宗泽 黄家驹 黄晓明 黑鸭子 黑龙
</p>
<p><span>I</span>
I Me IU Icona Pop Il Divo Imagine Dragons Infinite Ingrid Michaelson Isgaard
</p>
<p> <span>J</span>
Janet Jackson Jason Chen Jason Derulo Jason Mraz Jason Wade 吉杰 吉田亚纪子 蒋大为 蒋蒋 蒋雪儿 解小东 酒井法子
</p>
<p> <span>K</span>
Kimberley Kiss组合 kanye west katie melua 柯有伦 柯有纶 柯震东 筷子兄弟
</p>
<p><span>L</span>
Lana Del Rey Led Zeppelin Lee Ssang Lene Marlin 刘德华 刘德海 李克勤 李双江 林忆莲 林志炫 林志玲
</p>
<p><span>M</span>
MC Hotdog Michael Bolton Michael Buble Michael Jackson 孟非 麦田守望者 麻吉
</p>
<p><span>N</span>
Nat King Cole Natasha Bedingfield Naughty Boy 牛朝阳 牛牛 那英
</p>
<p> <span>O</span>
Oasis Oceanlab Olivia Ong Olly Murs 欧得洋 欧阳菲菲
</p>
<p><span>P</span>
Pharrell Phil Collins Phillip Phillips 彭芳 彭野新儿歌 潘长江 蒲提
</p>
<p> <span>Q</span>
邱泽 青山 青山黛玛 青春美少女 青蛙乐队 青鸟飞鱼
</p>
<p> <span>R</span>
Rammstein Ray Charles Red Hot Chili Pep.. Regina Spektor 容祖儿 容韵琳 荣联合 饶天亮
</p>
<p> <span>S</span>
Sara Bareilles Sarah Brightman Sarah Connor Something Corpor.. Sophie Zelmani 司徒兰芳 少女时代 少女时代-太蒂徐 尚雯婕
</p>
<p> <span>T</span>
Tears For Fears The Band Perry The Beatles The Black Eyed P.. The Cardigans 谭杰希 谭欣懿 谭维维 谭耀文 陶钰玉
</p>
<p> <span>U</span>
UVERworld Usher u2
</p>
</body>