【发布时间】:2022-04-26 17:51:35
【问题描述】:
我已经设置了一个 div 以在悬停时从页面底部之外向上移动。当我在 Android(firefox 和 chrome)上尝试时,这在 firefox“响应式设计模式”中运行良好。 div 在手指上方过渡并且无法返回其原始状态。
<!DOCTYPE html>
<html>
<head>
<title>Swipe Gesture - Gallery</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta id="viewport" name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0;" />
<style>
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: sans-serif;
}
.gallery {
width: 100vw;
height: 100vh;
background: #3A3;
}
#backButton {
position: fixed;
right: 35%;
bottom: -30px;
width: 30%;
height: ;
background: hsla(80, 90%, 40%, 0.2);
color: white;
margin: 0 0 0 0;
padding: 20px 0 10px 0;
text-align: center;
-webkit-transition: 0.5s;
border: solid hsla(80, 90%, 40%, 0.5);
border-right: none;
box-shadow: 0 1px 3px black;
border-radius: 10px 10px 0 0;
}
#backButton:hover {
bottom: 0;
}
</style>
</head>
<body>
<div class="gallery"></div>
<div id="backButton">Home</div>
</body>
</html>
块引用
【问题讨论】:
标签: html css google-chrome firefox