<html>
<body>
<div align="center">
<form method="link" action="file:///C:/Users/David/Desktop/about%20samoyeds">
<input type="submit" value="About Samoyeds" style="width:120px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
<form method="link" action="http://www.hillspet.com/en/us/dog-breeds/samoyed">
<input type="submit" value="History of Samoyeds" style="width:150px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
<form method="link" action="file:///C:/Users/David/Desktop/dealers%20of%20samoyeds">
<input type="submit" value="Samoyed Dealers" style="width:130px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
</div>
</body>
</html>
&#13;
这是我使用的代码更多但与此无关,所以它不在那里我对该代码有问题
答案 0 :(得分:3)
制作form
元素display: inline-block;
顺便说一句,align
属性已弃用。使用CSS来对齐/居中。
.wrap {
text-align: center;
}
form {
display: inline-block;
}
<div class="wrap">
<form method="link" action="file:///C:/Users/David/Desktop/about%20samoyeds">
<input type="submit" value="About Samoyeds" style="width:120px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
<form method="link" action="http://www.hillspet.com/en/us/dog-breeds/samoyed">
<input type="submit" value="History of Samoyeds" style="width:150px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
<form method="link" action="file:///C:/Users/David/Desktop/dealers%20of%20samoyeds">
<input type="submit" value="Samoyed Dealers" style="width:130px; height:40px; background-color: darkwhite; border-color: black; ">
</form>
</div>