为什么我不能在文字周围包裹图片?

问题描述 投票:0回答:1

为什么不能将图像包裹在文本周围(将图像放在文本后面?

Css代码:

.wrap5{
        background-image: url ('https://upload.wikimedia.org/wikipedia/commons/e/e3/Alto%27s_Adventure_animation_-_01_Chasm.gif');
}

HTML代码:

<div class = "wrap5">
<br><br>
<center><h1 style = "color: blue; font-family: monsterrat; letter-spacing: 1px; font-weight: 900;">Are you willing to go on the best journey?</h1></center>
<br><br><br><br>
<center>
<button class = "but" style = "float: center" onclick = "document.getElementById('modal-wrapper2').style.display='block'">Get Started</button>
</center>
<br><br>
<hr>
</div>
html css image containers wrapper
1个回答
1
投票

删除URL和左括号之间的空白:

.wrap5{
        background-image: url('https://upload.wikimedia.org/wikipedia/commons/e/e3/Alto%27s_Adventure_animation_-_01_Chasm.gif');
}
© www.soinside.com 2019 - 2024. All rights reserved.