最新回答 / 王民会
就是切边。好比你现在给相片镶框,给你一块完整的木板(背景图片),是按尺寸从木板的四个边来切的。<!doctype html><html><head><meta charset="utf-8"><title>边框图片</title><style>#border_image { margin:0 auto; height:100px; line-height:100px; text-align:center; font-...
2017-11-14
应该可以这样,不过颜色没仔细调:
/*使用伪元素制作导航列表项分隔线*/
li:before {
content: " ";
position: absolute;
left: 0px;
top: 15px;
width: 1px;
height: 20px;
display: inline-block;
background-image: linear-gradient(to bottom, red, gray, red);
}
/*使用伪元素制作导航列表项分隔线*/
li:before {
content: " ";
position: absolute;
left: 0px;
top: 15px;
width: 1px;
height: 20px;
display: inline-block;
background-image: linear-gradient(to bottom, red, gray, red);
}
2017-11-13
<html>
<head>
<meta charset="utf-8">
<title>结构性伪类选择器—target</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="menuSection" id="brand">
<h2><a href="#brand">Brand</a></h2>
<p>content for Brand</p>
</div>
</body>
</html>
<head>
<meta charset="utf-8">
<title>结构性伪类选择器—target</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="menuSection" id="brand">
<h2><a href="#brand">Brand</a></h2>
<p>content for Brand</p>
</div>
</body>
</html>
2017-11-12
个人觉得把:first-child解释成该元素父元素的第一个子元素不太合适,比如本例中,.wrapper > div:first-child按这个解释应该选中第一个p元素,但是经过测试并没有效果,:first-of-type因为限定了类型按老师的解释倒也说的通,但还是觉得这样解释不好理解,我就按我自己理解的来了。不知道对不对,大家都试试吧。
2017-11-11
大家可以试下这个图片地址,也就是上边案列的图片:
border-image:url(http://img1.sycdn.imooc.com//52e21fea000127e802100210.jpg) 70 repeat;
border-image:url(http://img1.sycdn.imooc.com//52e21fea000127e802100210.jpg) 70 repeat;
2017-11-10