gpt4 book ai didi

html - 在页面中心彼此相邻的位置按钮

转载 作者:太空狗 更新时间:2023-10-29 15:22:51 24 4
gpt4 key购买 nike

我尝试将两个按钮并排放置在页面中央,并在您调整页面大小时使按钮保持静态。

<!doctype html>
<html lang="en">

<head>
<style>
#button1{
width: 300px;
height: 40px;

}
#button2{
width: 300px;
height: 40px;
}
</style>

<meta charset="utf-8">
<meta name="Homepage" content="Starting page for the survey website ">

<title> Survey HomePage</title>
</head>
<body>

<img src="kingstonunilogo.jpg" alt="uni logo" style="width:180px;height:160px">
<button type="button home-button" id="button1" >Home</button>
<button type="button contact-button" id="button2">Contact Us</button>
</body>
</html>

最佳答案

您可以将此样式添加到您的按钮:

#button1 , #button2 {
display:inline-block;
/* additional code */
}

这会将您的按钮对齐。 ('并排'):)

关于html - 在页面中心彼此相邻的位置按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27671709/

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