gpt4 book ai didi

html - 框宽度 100% 的 CSS3 问题

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

我在显示一些 CSS3 框时遇到问题,其中宽度设置为 100% 但没有完全显示,我确定我在某处犯了错误,但我不确定在哪里 :)。

您会在 HTML 代码和 CSS 中看到有两个框:“Box”和“Boxgray”

box div 一直到 100% 但 boxgray 不是...我希望 boxgray 的宽度相同。

这是我的代码的链接:

http://jsfiddle.net/gEtp6/2/

谢谢

<div class="box" style="background-color:#DDDDDD;background-image:-webkit-linear-gradient(top, #FFFFFF 5%, #F0F0FF 70%, #E3E7F7 100%);">
<h1>Download Our Software</h1>

Download Our Software

</div>

<div class="boxgray" style="width:283px; height:180px;">
<h2><img src="images/windows.png" alt="Download for Windows">
<a href="Install.exe" onclick="javascript: pageTracker._trackPageview('download.kit.Windows');" >Windows Installer</a></h2>
No requirements.
</div>

<div class="boxgray" style="width:283px; height:180px;">
<h2><img src="images/linux.png" alt="Download for Linux">
<a href="Install.jar" onclick="javascript: pageTracker._trackPageview('download.kit.Linux');" >Linux</a></h2>
Java 1.6 or later required.
</div>

<div class="boxgray" style="width:283px; height:180px;">
<h2><img src="images/mac.png" alt="Download for Mac">
<a href="InstallMac.dmg" onclick="javascript: pageTracker._trackPageview('download.kit.mac');" >Mac</a></h2>
<small>On MacOS 10.8 you have to set in System Preferences / Security & Privacy / Allow Applications from Anywhere. We are working to fix this issue.</small>
</div>

<div class="box" style="width:100%">
<h2>Alternative Download</h2>
For all platforms you can download a <a href="asd.zip" onclick="javascript: pageTracker._trackPageview('download.kit.zip');" >zip package</a>.
Java 1.6 or later is required.
<p>
In case of problems with the downloaded package or any issue with the software please <a href="support.html">let us know</a>.
asdasdasdasdasd

<p>
<h2>Connect asdasdasd</h2>
asdasdasdasdasdasdasdasdasdasdasd
In this cases please <a href="support.html">write us</a>.


</div>

最佳答案

尝试固定 box 的宽度,例如:

.box{
width: 1024px;
}

正常情况下它可以正常工作。

关于html - 框宽度 100% 的 CSS3 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15472446/

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