小程序跳转到选择页面的样式
时间: 2023-09-22 14:15:34 浏览: 42
好的,以下是一个简单的HTML和CSS代码示例,它可以创建一个选择设备的页面,包含三个设备选项(手机、电脑和平板),并且可以跳转到其他页面。
```html
<!DOCTYPE html>
<html>
<head>
<title>选择设备</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
h1 {
text-align: center;
margin-top: 50px;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 50px;
}
.btn {
background-color: #4CAF50;
color: white;
padding: 15px;
border: none;
border-radius: 5px;
width: 200px;
text-align: center;
text-decoration: none;
font-size: 20px;
margin-top: 20px;
cursor: pointer;
}
.btn:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<h1>请选择您要连接的设备:</h1>
<div class="container">
<a href="https://www.example.com/phone" class="btn">手机</a>
<a href="https://www.example.com/computer" class="btn">电脑</a>
<a href="https://www.example.com/tablet" class="btn">平板</a>
</div>
</body>
</html>
```
这个页面包含一个标题和一个包含三个设备选项的容器。每个选项都是用一个带有链接的按钮表示的。当用户单击任何一个按钮时,它会跳转到指定的链接页面。页面的样式使用了简单的CSS来设置背景颜色、字体、按钮样式等。您可以根据需要修改CSS样式,以实现所需的外观效果。