jQuery开发QQ客服教程之...LOGIN

jQuery开发QQ客服教程之css修饰页面

首先,根据HTML里面的标签,我们先设置一个公共样式

*{padding:0;margin:0;}

html,body{font-size:12px;font-family:"宋体";outline:none;color:#666;background:#fff;}

ul,ol{list-style:none;}

img{border:none;outline:none;}

a{color:#666;text-decoration:none;outline:none;}

a:hover{color:#e8431f;}

然后根据class或者id值定义特定样式

body{height:3000px;}

#floatDivBoxs{width:170px;background:#fff;position:fixed;top:100px;right:0;z-index:999;}

#floatDivBoxs .floatDtt{width:100%;height:45px;line-height:45px; background:#f08326;color:#fff;font-size:18px;text-indent:22px;position:relative;}

#floatDivBoxs .floatDqq{padding:0 14px;}

#floatDivBoxs .floatDqq li{height:45px;line-height:45px;font-size:15px;border-bottom:1px solid #e3e3e3;padding-left:0px;}

#floatDivBoxs .floatDtxt{font-size:18px;color:#333;padding:12px 14px;}

.floatShadow{ background:#fff;box-shadow:-2px 0 3px rgba(0,0,0,0.25);}

#rightArrow{width:50px;height:45px;background:url(https://img.php.cn/upload/image/380/320/544/1478308842480674.jpg) no-repeat;position:fixed;top:100px;right:170px;z-index:999;}

#rightArrow a{display:block;height:45px;}

完整代码如下:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> 
 <meta name="format-detection" content="telephone=no" /> 
<title>QQ客服</title>
<style>
/* 公共样式定义 */
*{padding:0;margin:0;}
html,body{font-size:12px;font-family:"宋体";outline:none;color:#666;background:#fff;}
ul,ol{list-style:none;}
img{border:none;outline:none;}
a{color:#666;text-decoration:none;outline:none;}
a:hover{color:#e8431f;}
/*根据class或者id值定义样式*/
body{height:3000px;}
#floatDivBoxs{width:170px;background:#fff;position:fixed;top:100px;right:0;z-index:999;}
#floatDivBoxs .floatDtt{width:100%;height:45px;line-height:45px; background:#f08326;color:#fff;font-size:18px;text-indent:22px;position:relative;}
#floatDivBoxs .floatDqq{padding:0 14px;}
#floatDivBoxs .floatDqq li{height:45px;line-height:45px;font-size:15px;border-bottom:1px solid #e3e3e3;padding-left:0px;}
#floatDivBoxs .floatDtxt{font-size:18px;color:#333;padding:12px 14px;}
.floatShadow{ background:#fff;box-shadow:-2px 0 3px rgba(0,0,0,0.25);}
#rightArrow{width:50px;height:45px;background:url(https://img.php.cn/upload/image/380/320/544/1478308842480674.jpg) no-repeat;position:fixed;top:100px;right:170px;z-index:999;}
#rightArrow a{display:block;height:45px;}
</style>
</head>
<body>
<div id="rightArrow"><a href="#" title="在线客户"></a></div>
<div id="floatDivBoxs">
 <div class="floatDtt">在线客服</div>
 <div class="floatShadow">
 <ul class="floatDqq">
 <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="https://img.php.cn/upload/image/477/494/683/1478309332960894.png" > 在线客服1</a></li>
 <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="https://img.php.cn/upload/image/477/494/683/1478309332960894.png" > 在线客服2</a></li>
 <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="https://img.php.cn/upload/image/477/494/683/1478309332960894.png" > 在线客服3</a></li>
 </ul>
 <div class="floatDtxt">热线电话<br/>0551-123456789</div>
 </div>
</div>
</body>
</html>

大家可以尝试修改其中的部分样式,查看会有什么变化

下一节
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="format-detection" content="telephone=no" /> <title>QQ客服</title> <style> /* 公共样式定义 */ *{padding:0;margin:0;} html,body{font-size:12px;font-family:"宋体";outline:none;color:#666;background:#fff;} ul,ol{list-style:none;} img{border:none;outline:none;} a{color:#666;text-decoration:none;outline:none;} a:hover{color:#e8431f;} /*根据class或者id值定义样式*/ body{height:3000px;} #floatDivBoxs{width:170px;background:#fff;position:fixed;top:100px;right:0;z-index:999;} #floatDivBoxs .floatDtt{width:100%;height:45px;line-height:45px; background:#f08326;color:#fff;font-size:18px;text-indent:22px;position:relative;} #floatDivBoxs .floatDqq{padding:0 14px;} #floatDivBoxs .floatDqq li{height:45px;line-height:45px;font-size:15px;border-bottom:1px solid #e3e3e3;padding-left:0px;} #floatDivBoxs .floatDtxt{font-size:18px;color:#333;padding:12px 14px;} .floatShadow{ background:#fff;box-shadow:-2px 0 3px rgba(0,0,0,0.25);} #rightArrow{width:50px;height:45px;background:url(http://img.php.cn//upload/image/380/320/544/1478308842480674.jpg) no-repeat;position:fixed;top:100px;right:170px;z-index:999;} #rightArrow a{display:block;height:45px;} </style> </head> <body> <div id="rightArrow"><a href="#" title="在线客户"></a></div> <div id="floatDivBoxs"> <div class="floatDtt">在线客服</div> <div class="floatShadow"> <ul class="floatDqq"> <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="http://img.php.cn//upload/image/477/494/683/1478309332960894.png" > 在线客服1</a></li> <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="http://img.php.cn//upload/image/477/494/683/1478309332960894.png" > 在线客服2</a></li> <li ><a target="_blank" href="tencent://message/?uin=126401073&Site=sc.chinaz.com&Menu=yes"><img src="http://img.php.cn//upload/image/477/494/683/1478309332960894.png" > 在线客服3</a></li> </ul> <div class="floatDtxt">热线电话<br/>0551-123456789</div> </div> </div> </body> </html>
提交重置代码
章节课件