gpt4 book ai didi

css - 图像不适用于 css

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

很抱歉,如果这是一个愚蠢的问题,但出于某种原因,在工作了 5 个小时后,我仍然没有任何工作......

我有一个带有 Logo 和电话的标题(两者都是图像)。我希望电话位于标题的中间右侧,然后在用户调整窗口大小时移动到左侧。但是当我尝试时,它会向下移动。我希望 Logo 位于 ΛΟΓΙΣΜΙΚΟ 的顶部,并在用户调整大小时随菜单一起移动(保持在顶部)。

这是网站:http://www.altasoft.gr/index_.htm

这可以用 JavaScript 完成吗?

 <div class="header">
<div style="position:relative; left:17%; top:10px; z-index:99;">
<img src="images/Altasoft_Logo.png" alt="" width="354" height="91" />
</div>

<div style="position:relative; left:80%; top:-30px; z-index:5;">
<img src="images/telephone.gif" alt="" width="142" height="16" />
</div>
</div>

最佳答案

.header {
margin: 0 auto;
padding: 0;
position: relative;
text-align: left;
width: 931px; /* make this same width than 'main content'*/
z-index: 10;
}

在你的第一个分隔线中,这样设计:

element.style {
/* left: 17%; */ /* remove the left:17% */
position: relative;
top: 10px;
width: 50%;
z-index: 99;
}

它将对齐您的标题和菜单

关于css - 图像不适用于 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17748020/

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