簡體   English   中英

如何使完整圖像出現在分割樣式的左側

[英]How to make the full image appear at left side of division style

如何在分割樣式的左側放置小圖像?

例子:

下面的代碼不起作用,我應該添加什么才能使圖像出現在 div 標簽的左側

<div style="text-align:center;background-color: white; padding: 10px;background-image:url('https://blog.hubspot.com/hubfs/image8-2.jpg');background-size: 100% 100%">GOOGLE</div>

您現在所做的是將 div 的背景設置為該圖像。 你也舉的例子,我不明白。 這個例子只是一個圖像。 如果你想做你所說的 你可以這樣做,看看你在說什么

<div style="width:auto; height:auto;"><img src="https://blog.hubspot.com/hubfs/image8-2.jpg" style="float:left; height:100px; width:100px;"/> <div style="background-color: blue; height:100px; width:200px float:left"</div></div>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM