最简单的跳转页面,记录给渣渣的自己。
很low的两个html界面1和2,在1页面上设置一个button,按下按钮,跳转至自己写的2界面。
代码如下:
<body>
<div class="wrapper">
<div class="container">
<h1>Welcome</h1>
<form class="form">
<button><a href="./2.html">跳转至2</a></button>
</form>
</div>
</div>
</body>
注:通过a标签实现跳转,按钮上的文字会有下划线标出表明是超链接,太丑了。
可以在title标签下添加对它的调整。
代码如下:
<style>
form button {
outline: 0;
background-color: white;
border: 0;
padding: 13px 15px;
color: #53e3a6;
border-radius: 3px;
width: 250px;
cursor: pointer;
font-size: 18px;
position: relative;
}
form button:hover {
background-color: rgba(255, 255, 255, 0.4);
}
a {
text-decoration: none;
}
</style>
其他需要的样式可在style标签中添加。