ancestor descendant选择器
作者:互联网
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script language="javascript"src="jss/jquery-1.11.1.min.js"></script>
<title>ancestor descendant选择器</title>
</head>
<body>
<div id="buttom">
<ul>
<li>技术服务热线:。。。。传真:.... 企业邮箱:....</li>
<li>Copuright©www.mrbccd.com All Rights Reserved!</li>
</ul>
</div>
<ul>
<li>技术服务热线:.... 传真:.... 企业邮箱:....</li>
<li>Copyright©www.mrbccd.com All Rights Reserved!</li>
</ul>
<style type="text/css">
#bottom{
background-image:url(images/bg_bottom.jpg); /*设置背景*/
width:800px; /*设置宽度*/
hight:58px; /*设置高度*/
clear:both; /*设置左右两侧无浮动内容*/
text-align:center; /*设置居中对齐*/
padding-top:10px; /*设置顶边距*/
font-size:9pt; /*设置字体大小*/
}
.copyright{
color:#FFFFFF; /*设置文字颜色*/
list-style:none; /*不显示项目符号*/
line-hight:20px; /*设置行高*/
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("div ul").addClass("copyright"); //为div元素的子元素ul添加样式
});
</script>
</body>
<html>
标签:www,....,div,设置,企业邮箱,ancestor,选择器,descendant 来源: https://blog.csdn.net/qq_45683093/article/details/102771451