gpt4 book ai didi

php - 如何在两个水平图像之间添加空间?

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

超链接的图像之间似乎没有任何水平空间,因此看起来皱巴巴的。应用宽度似乎不起作用,我尝试了其他不起作用的答案。

enter image description here

这是我的 PHP 代码:

<?php
include_once("php_includes/check_login_status.php");
if($user_ok != true || $log_username == ""){
header("location: http://burningchat.tk/home");
exit();
}
$_SESSION['user_id'] = md5(time());
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body{ margin: 0px; text-align: center; font-family: Arial; }
#pagetop{
position: fixed;
top: 0px;
width:100%;
height: 120px;
background: #FF5C26;
color: #FFF;
font-size: 23px;
padding-top: 50px;
transition: height 0.3s linear 0s, padding 0.3s linear 0s;
overflow:hidden;
}
#pagetop > #menu{
position: absolute;
bottom: 0px;
width:100%;
background: #FD4000;
height: 50px;
transition: height 0.3s linear 0s;
}
#wrapper{ margin-top: 230px;
}
#mainbody{
margin-top: 50px;
display:block;
}
</style>
<script>
var pagetop, menu, yPos;
function yScroll(){
pagetop = document.getElementById('pagetop');
menu = document.getElementById('menu');
yPos = window.pageYOffset;
if(yPos > 150){
pagetop.style.height = "36px";
pagetop.style.paddingTop = "8px";
menu.style.height = "0px";
} else {
pagetop.style.height = "120px";
pagetop.style.paddingTop = "50px";
menu.style.height = "50px";
}
}
window.addEventListener("scroll", yScroll);
</script>
</head>
<body>
<div id="pagetop">
The Gaming Hub
<div id="menu"><a href="http://burningchat.tk/home/user.php"><img src="images/home.png" alt="Chat" border="0" title="Go Back to Burning Chat"></a></div>
</div>
<div id="wrapper">
<h1><span style="font-family:tahoma,geneva,sans-serif;">Welcome to the Gaming Hub,</span></h1>

<p><span style="font-family:tahoma,geneva,sans-serif;">Whether the need is for something fun, or just to pass the time. Burning Chat&#39;s Gaming Hub allows a variety of fun activities, all for free.</span></p>
<hr width="50%">
<div id="mainbody">
<a href="http://burningchat.tk/home/chat/type/standard.html"><img src="images/standard.png" alt="Chat" border="0" title="Standard"></a>

<a href="http://burningchat.tk/home/chat/type/carbon.html"><img src="images/carbon.png" alt="Chat" border="0" title="Carbon"></a>

<a href="http://burningchat.tk/home/chat/type/gamer.html"><img src="images/gamer.png" alt="Chat" border="0" title="Gamer"></a>

</body>
</html>

最佳答案

像这样在元素中使用边距:

 #mainbody a{
margin: 0 5px;
}

关于php - 如何在两个水平图像之间添加空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30556837/

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