gpt4 book ai didi

css - 尝试通过 css 添加标题是重复的

转载 作者:行者123 更新时间:2023-11-28 07:15:29 24 4
gpt4 key购买 nike

我试图将这个 header 放在 css 中,但没有运气,我尝试将它放在宽度容器中,但它只是重复自己。

background:url(http://outpostmotorsports.com/OPMSwordpress/wp-content/uploads/2015/09/Y5a5qUNx6jvD9pN6AH5VMslP656QnElptjDvGKR65Fk.jpg) no-repeat;

编辑添加CSS代码

.width-container, .flex-caption .slider-container {-moz-transition: all
.2s ease-in-out; -webkit-transition: all .2s ease-in-out;
background:url(http://outpostmotorsports.com/OPMSwordpress/wp-content/uploads/2015/09/Y5a5qUNx6jvD9pN6AH5VMslP656QnElptjDvGKR65Fk.jpg) no-repeat;}

如果您查看 css 中的源代码,您将在第 41 行设置宽度容器

我试图从这里为所有页面添加页眉

http://outpostmotorsports.com/OPMSwordpress/inventory/1989-harley-davidson-sportster/

注2

还是显示了三遍 enter image description here

最佳答案

像这样尝试:

 background:url(http://outpostmotorsports.com/OPMSwordpress/wp-content/uploads/2015/09/wp_header.jpg) 
background-repeat: no-repeat;

The background-repeat property sets if/how a background image will be repeated.

By default, a background-image is repeated both vertically and horizontally.

Tip: The background image is placed according to the background-position property. If no background-position is specified, the image is always placed at the element's top left

来源:(w3schools)

祝你好运!

关于css - 尝试通过 css 添加标题是重复的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32376762/

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