作者:电脑信息网日期:
返回目录:设置问题
font:italic bold 12px/20px arial,sans-serif;
含义:斜体 加粗 字号抄12px 行高袭20px 字体arial
你的代码就这么写
font:12px "微软雅黑zhidao";
1.用同一个类名。如:
css代码度:
.box{ width:100px; height:100px; background-color:red;}
html代码:
<div class="box">我是内div</div>
<h1 class="box">我是h1</h1>
<p class="box">我是p</p>
2.不同的容选择器用,隔开,如:
css代码:
.box,.box1,#box2{ width:100px; height:100px; background-color:red;}
html代码:
<div class="box">我是div</div>
<h1 class="box1">我是h1</h1>
<p id="box2" 我是p</p>
1、给每个LI指定style
2、给每个LI指定class 或者 ID,然后每个class的样式不一样
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http:///1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>A标签</title>
<style type="text/css">
*{ margin:0; padding:0;}
a{ color:#00C; text-decoration:none; padding:0 20px;}/*整个e79fa5e98193e4b893e5b19e333页面A标签的属性*/
a:hover{ color:#F00; text-decoration:underline}/*整个页面A标签鼠标滑过属性*/
.one,.two{ width:800px; margin:20px auto; line-height:36px; border:1px solid green;}
.two a{ color:#000;}/*在.two这个div里面A标签的属性*/
.two a:hover{ color:#0F0;}
</style>
</head>
<body>
<div class="one"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>
<div class="two"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>
</body>
</html>