当我将线性渐变和 url 放在一起时,它工作正常:
HTML:
<div class="image" style="height:400px;width:400px;">
Run Code Online (Sandbox Code Playgroud)
CSS:
.image {
background:
linear-gradient(
rgba(0, 26, 56, 0.7),
rgba(0, 0, 69, 0.7)
),
url('http://incolor.inebraska.com/tgannon/grfs/birds256_oth/OwlGrH256x256.jpg');
}
Run Code Online (Sandbox Code Playgroud)
JSFIDDLE:
https://jsfiddle.net/5mb6hu3u/
但是当我单独使用它时,它不会工作:
HTML:
<div class="image" style="height:400px;width:400px;background: url('http://incolor.inebraska.com/tgannon/grfs/birds256_oth/OwlGrH256x256.jpg')">
Run Code Online (Sandbox Code Playgroud)
CSS:
.image {
background:
linear-gradient(
rgba(0, 26, 56, 0.7),
rgba(0, 0, 69, 0.7)
);
}
Run Code Online (Sandbox Code Playgroud)
JSFIDDLE:
https: //jsfiddle.net/5mb6hu3u/1/
有很多图像需要应用渐变,有什么方法可以在不使用<img>标签的情况下做到这一点?
我可以将C值更高到3n³+ 4n-5 == O(n²)是真的吗?
例:
3n³+ 4n-5 <=3000n²+4000n²==7000n²C
= 7000