-
Notifications
You must be signed in to change notification settings - Fork 0
/
横向滚动.html
41 lines (40 loc) · 1.01 KB
/
横向滚动.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<link rel="stylesheet" type="text/css" href="jquery-1.10.1.min.js">
<style type="text/css">
*{margin:0;padding:0;box-sizing:border-box;}
div{
width: 100%;height: 40px;border:1px solid red;position: relative;overflow: hidden;
}
ul{
height: 40px;list-style: none;overflow: hidden;overflow-x: scroll;white-space: nowrap;
}
li{
display: inline-block;height: 40px;
}
a{
padding:0 5px;white-space: nowrap;
}
</style>
</head>
<body>
<div>
<ul>
<li><a href="">abc</a></li>
<li><a href="">sfsfsf</a></li>
<li><a href="">fsdsf</a></li>
<li><a href="">dsfasf</a></li>
<li><a href="">dsfsa</a></li>
<li><a href="">dsafs</a></li>
<li><a href="">sdfsaf</a></li>
<li><a href="">sadfs</a></li>
<li><a href="">fsdaf</a></li>
<li><a href="">fdsf</a></li>
</ul>
</div>
</body>
</html>