gpt4 book ai didi

html - 使用 CSS 向下移动 LI

转载 作者:行者123 更新时间:2023-11-28 07:01:53 25 4
gpt4 key购买 nike

这是我要添加的html内容。这是我公司的 4 个垂直领域,他们有个人客户,我希望这些客户的 Logo 出现在同一个框中,向下移动,将剩余的文本向下移动, Logo 画廊向下移动。

  <div class="box1">
<div class="box1_bot">
<div class="box1_top">
<div class="pad" >
<h2>CLIENTS</h2>

<ul>
<li><a href="#home">Consultants4manpower</a></li>
<li><a href="#news">Corporate Training</a></li>
<li><a href="#contact">English and PD Training</a></li>
<li><a href="#about">Career Counselling</a></li>
</ul>
</div>
</div>
</div>
</div>

最佳答案

<html>
<head>
<script>

function show_logo_home(){
var loc = document.getElementById("logo");
var linknews = document.getElementById("news");
var linkcontact = document.getElementById("contact");
var linkabout = document.getElementById("about");
loc.style.visibility="visible";
loc.style.marginTop="-227";
linknews.style.marginTop="150";
}
</script>
<style>
#logo {
background-color: #F00;
height: 150px;
width: 150px;
margin-left: 30px;
position: absolute;
visibility:hidden;}
</style>
</head>
<body>
<div class="box1">
<div class="box1_bot">
<div class="box1_top">
<div class="pad" >
<h2>CLIENTS</h2>

<ul>
<li ><a href="#home" onclick="show_logo_home()"id="home">Consultants4manpower</a></li>
<li id="news"><a href="#news" onclick="show_logo_news()"id="news">Corporate Training</a></li>
<li id="contact"><a href="#contact" onclick="show_logo_contact()"id="contact">English and PD Training</a></li>
<li id="about"><a href="#about" onclick="show_logo_about()"id="about">Career Counselling</a></li>
</ul>
</div>
</div>
</div>
</div>

<div id="logo"></div>
</body>
</html>

关于html - 使用 CSS 向下移动 LI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33185140/

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