我的图像有问题.我试图模糊图像的一部分,但我的解决方案无法正常工作.请看一下这段代码:
HTML文件
<div id="image">
<div class="blur"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS文件
#image {
width: 940px;
height: 360px;
background-image: url('../img/photo.png');
}
#image .blur {
background-image: url('../img/photo.png');
background-position: center right;
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-o-filter: blur(3px);
-ms-filter: blur(3px);
filter: blur(3px);
filter: blur(3px);
float: right;
height: 100%;
width: 360px;
}
Run Code Online (Sandbox Code Playgroud)
CSS中有可能吗?
可以使用CSS缩放SVG吗?我曾经<img>在HTML中插入SVG图标。这是我的代码:http : //jsfiddle.net/kw5fuw7L/。
nav {
width: 100%;
background: #202125;
box-shadow: 0px 1px 0px 0px #2C2E32;
padding: 0;
overflow: hidden;
}
nav ul {
list-style: none;
overflow: hidden;
margin: 0;
padding: 0;
}
nav ul li {
float: left;
position: relative;
padding: 20px 0;
width: 120px;
text-align: center;
}
nav ul li.active {
background: #F5A623;
}
svg path {
fill: #fff !important;
}
nav ul li .svg-container {
width: 20px;
height: 10px;
margin: 0 auto;
padding: 0 …Run Code Online (Sandbox Code Playgroud)