gpt4 book ai didi

html - 需要背景图像覆盖另一个背景图像

转载 作者:搜寻专家 更新时间:2023-10-31 22:46:18 31 4
gpt4 key购买 nike

到目前为止我还没有成功解决这个问题,所以我需要帮助。我想要做的是让背景图像适合平板电脑。在里面我有一张 table ,还有一个右上角的标志,但现在我想在背景上有一个透明的标志,只有屏幕的一半..标志是一只鹰,但我只想要一半它在背景上。老鹰必须在背景之上(透明),但也要在 table 后面……想法?建议?代码明智?

最基本的是,在另一个背景图像(透明)上放置一个背景图像,并且只覆盖屏幕的一半。

谢谢

body { width: 100%; height:100%; display: -webkit-box; display: -moz-box; display: box; text-align:center;

background:url(1xx.png);
-webkit-background-size: cover !important;
-moz-background-size: cover;
background-size: cover;
font-family: Arial, Times New Roman, sans-serif;
font-size: 20px;
z-index:0; } body{ display: table; width: 100%; } .box {
width: 75%;
height:90%;

margin-left:auto;
margin-right: auto;
margin-top:auto;
margin-bottom: auto;
}

最佳答案

有两种选择,要么使用CSS3多重背景:

background-image: url(eagle.png), url(background-image.png);
background-position: left top, center top;
background-repeat: no-repeat;

或使用 position:Absolute;

将老鹰定位在背景上

关于html - 需要背景图像覆盖另一个背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18152912/

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