gpt4 book ai didi

html - 更改按钮的背景图像

转载 作者:太空宇宙 更新时间:2023-11-04 09:44:50 25 4
gpt4 key购买 nike

无法将按钮的图像更改为箭头,尝试了多种方法但效果不佳。

    button .arrow{
background-image: url("http://alexoliveira.me/Hawaii/images/chevron-left.png");
background-repeat: no-repeat;
background-position: 50% 50%;
/* put the height and width of your image here */
height: 50px;
width: 200px;
border: none;
}

.arrows {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
position:absolute;

}
    <div class="arrows">
<button onClick="carousel(-1)" class="arrow" style="width:20px;height:40px;"></button>
<button onClick="carousel(1)" src="http://alexoliveira.me/Hawaii/images/chevron-right.png" class="arrow" style="width:20px;height:40px;"></button>
</div>

最佳答案

只需将您的 css 更新为 button.arrow(删除空格)。然后你必须调整你的样式表

关于html - 更改按钮的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39562688/

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