gpt4 book ai didi

css - 如何从桌面使用 Css 将背景图像插入到 div 中?

转载 作者:太空宇宙 更新时间:2023-11-03 19:27:34 28 4
gpt4 key购买 nike

HTML代码:

<div class="circleBase type1">

CSS 代码:

.type1 {
background-image: url("/img/me.jpg");`
width: 120px;
height: 120px;
border: 1px solid black;
};

最佳答案

.type1 {
background-image: url("http://www.addictedtoibiza.com/wp-content/uploads/2012/12/example.png");`
background-repeat: no-repeat;
background-size: cover;
height: 600px;
border: 1px solid black;
}
<div class="circleBase type1"></div>

引用这个。

关于css - 如何从桌面使用 Css 将背景图像插入到 div 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46025478/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com