gpt4 book ai didi

html - 在浏览器上放大和缩小时将内容保留在 div 中

转载 作者:行者123 更新时间:2023-11-28 04:09:19 29 4
gpt4 key购买 nike

当我在我的网站上放大和缩小时,导航栏和我的“打开触摸”文本似乎离开了 div 并向下 float ,而对于我的导航栏,当我放大时它似乎逐字消失. 在过去的 2 天里,我一直在尝试解决这个问题,并在这个网站上进行了研究,但似乎没有任何效果。我的代码和代码笔也将可用

如何防止“打开触摸”文本与导航栏重叠?

演示:http://codepen.io/anon/pen/xqLLeJ

html

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="https://fonts.googleapis.com/css?family=Nunito:700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Baloo" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>


<link rel="stylesheet" type="text/css" href="magicstyle.css">


<body>
<!-- Section for Jobs Popup -->
<div id="job-popup">
<div class="x-div"><img class="x-icon1" id="fadeX" src="web%20x%20icon%20white.png"></div>
<div id="job-content">
<h1 id="jobWords">Test</h1>

</div>

</div>
<!-- Section for Contact Popup -->
<div id="contact-popup">
<div class="x-div2"><img class="x-icon2" id="fadeX2" src="web%20x%20icon%20white.png"></div>
<div id="contact-content">

<h1 id="contactWords">Test</h1>

</div>

</div>

<!-- Section for Press Popu -->
<div id="press-popup">
<div class="x-div3"><img class="x-icon3" id="fadeX3" src="web%20x%20icon%20white.png"></div>
<div id="press-content">

<h1 id="pressWords">Test</h1>

</div>

</div>

<div id="legal-popup">
<div class="x-div4"><img class="x-icon4" id="fadeX4" src="web%20x%20icon%20white.png"></div>
<div id="legal-content">

<h1 id="legalWords">Test</h1>

</div>

</div>

<div id="support-popup">
<div class="x-div5"><img class="x-icon5" id="fadeX5" src="web%20x%20icon%20white.png"></div>
<div id="support-content">

<h1 id="supportWords">Test</h1>

</div>

</div>



<div id="top-bar">
<a class="burger-nav"></a>
<div id="nav-menu">
<span id="job">Jobs</span>
<span id="contact">Contact</span>
<span id="press">Press</span>
<span id="legal">Legal</span>
<span id="support">Support</span>

</div>


</div>
<div id="container">


<div id="name-div">
<h1 id="name">Open Touch</h1>
</div>
<ul class="bubbles">

<li id="firstCircle"></li>
<li id="secondCircle"></li>
<li id="thirdCircle"></li>
<li id="fourthCircle"></li>
<li id="fifthCircle"></li>
<li id="sixthCircle"></li>



</ul>



</div>

</body>



</head>




</html>

感谢任何帮助,谢谢你

最佳答案

中取出 overflow: hidden
#nav-menu {
width: 50%;
height: 70%;
position: absolute;
z-index: 101;
word-wrap: break-word;
/* overflow: hidden; */
left: 15%;
top: 20%;
}

关于html - 在浏览器上放大和缩小时将内容保留在 div 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42793267/

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