我尝试在我的标题下方获得相同的wave符号,如本网站http://harbr.co/所示,但它不起作用。到目前为止,我有以下CSS:
H2::after {
content: url ('images/wave.png');
position: absolute;
}
帮助?
答案 0 :(得分:0)
url
和(
之间有一个额外的空格。
H2::after {
content: url('images/wave.png');
position: absolute;
}
答案 1 :(得分:0)
body { background-color: gray; }
h2:after {
content: "";
width: 42px;
height: 8px;
background: url('http://harbr.co/wp-content/themes/harbr2015/img/icons/divWave-sprite.png');
background-size: 100px 250px;
background-position: -50px -50px;
position: absolute;
top: 1em;
}

<h2></h2>
&#13;