質問編集履歴
2
ソースの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -16,20 +16,20 @@
|
|
16
16
|
<script type="text/javascript" language="javascript">
|
17
17
|
|
18
18
|
function move_bt01(){
|
19
|
-
target = document.
|
19
|
+
target = document.getElementsByClassName("move-in");
|
20
20
|
target.style.marginLeft="0%";
|
21
21
|
}
|
22
22
|
function move_bt02(){
|
23
|
-
target = document.
|
23
|
+
target = document.getElementsByClassName("move-in");
|
24
|
-
target.style.marginLeft="
|
24
|
+
target.style.marginLeft="0%";
|
25
25
|
}
|
26
26
|
function move_bt03(){
|
27
|
-
target = document.
|
27
|
+
target = document.getElementsByClassName("move-in");
|
28
|
-
target.style.marginLeft="
|
28
|
+
target.style.marginLeft="0%";
|
29
29
|
}
|
30
30
|
function move_bt04(){
|
31
|
-
target = document.
|
31
|
+
target = document.getElementsByClassName("move-in");
|
32
|
-
target.style.marginLeft="
|
32
|
+
target.style.marginLeft="0%";
|
33
33
|
}
|
34
34
|
</script>
|
35
35
|
|
@@ -44,43 +44,120 @@
|
|
44
44
|
</script>
|
45
45
|
|
46
46
|
<style>
|
47
|
-
.
|
47
|
+
.type-list-bt{
|
48
|
-
float: left;
|
49
|
-
width:
|
48
|
+
width: 100%;
|
50
49
|
}
|
51
|
-
.
|
50
|
+
.type-list-bt ul{
|
52
|
-
|
51
|
+
font-size: 0;
|
53
|
-
width:
|
52
|
+
width: 100%;
|
53
|
+
max-width: 816px;
|
54
|
+
margin:0 auto 20px;
|
55
|
+
box-sizing: border-box;
|
56
|
+
padding: 0;
|
57
|
+
margin-top: 30px;
|
54
58
|
}
|
55
|
-
|
59
|
+
.type-list-bt li{
|
60
|
+
display: inline-block;
|
56
|
-
width:
|
61
|
+
width: 23%;
|
62
|
+
margin: 0 1%;
|
63
|
+
font-size: 14px;
|
64
|
+
background-color:#a4a4a4;
|
65
|
+
border-radius: 3px;
|
66
|
+
text-align: center;
|
67
|
+
padding: 5px;
|
68
|
+
color: #FFF;
|
69
|
+
box-sizing: border-box;
|
70
|
+
list-style: none;
|
71
|
+
cursor: pointer;
|
57
72
|
}
|
73
|
+
.active {
|
74
|
+
background-color: #329096!important;
|
75
|
+
color: #FFF!important;
|
76
|
+
border:none!important;
|
77
|
+
}
|
78
|
+
.left-box{
|
79
|
+
float: left;
|
80
|
+
width: 50%;
|
81
|
+
border: solid 1px #DDD;
|
82
|
+
height: 50px;
|
83
|
+
box-sizing: border-box;
|
84
|
+
}
|
85
|
+
.right-box{
|
86
|
+
float: right;
|
87
|
+
width: 50%;
|
88
|
+
border: solid 1px #DDD;
|
89
|
+
height: 50px;
|
90
|
+
box-sizing: border-box;
|
91
|
+
overflow: hidden;
|
92
|
+
}
|
93
|
+
.move-in{
|
94
|
+
width: 400%;
|
95
|
+
background-color: #C5D1FF;
|
96
|
+
height: 40px;
|
97
|
+
}
|
98
|
+
.move-in table{
|
99
|
+
width: 100%;
|
100
|
+
}
|
101
|
+
.move-in td{
|
102
|
+
width: 25%;
|
103
|
+
}
|
58
104
|
</style>
|
59
105
|
|
60
106
|
<body>
|
61
|
-
|
107
|
+
<div class="type-list-bt">
|
62
|
-
|
108
|
+
<ul>
|
63
|
-
|
109
|
+
<a onclick="move_bt01();return false;"><li class="active">A</li></a>
|
64
|
-
|
110
|
+
<a onclick="move_bt02();return false;"><li>B</li></a>
|
65
|
-
|
111
|
+
<a onclick="move_bt03();return false;"><li>C</li></a>
|
66
|
-
|
112
|
+
<a onclick="move_bt04();return false;"><li>D</li></a>
|
67
|
-
|
113
|
+
</ul>
|
68
|
-
|
114
|
+
</div>
|
69
115
|
|
70
116
|
<div class="left-box"></div>
|
71
117
|
<div class="right-box">
|
72
|
-
<div
|
118
|
+
<div class="move-in">
|
119
|
+
<table width="100%" border="0">
|
120
|
+
<tbody>
|
121
|
+
<tr>
|
122
|
+
<td>a</td>
|
123
|
+
<td>b</td>
|
124
|
+
<td>c</td>
|
125
|
+
<td>d</td>
|
126
|
+
</tr>
|
127
|
+
</tbody>
|
128
|
+
</table></div>
|
73
129
|
</div>
|
74
130
|
|
75
131
|
<!-- 下の2つのボックスを追加しても動かない-->
|
76
132
|
<div class="left-box"></div>
|
77
133
|
<div class="right-box">
|
78
|
-
<div
|
134
|
+
<div class="move-in">
|
135
|
+
<table width="100%" border="0">
|
136
|
+
<tbody>
|
137
|
+
<tr>
|
138
|
+
<td>a</td>
|
139
|
+
<td>b</td>
|
140
|
+
<td>c</td>
|
141
|
+
<td>d</td>
|
142
|
+
</tr>
|
143
|
+
</tbody>
|
144
|
+
</table>
|
79
145
|
</div>
|
146
|
+
</div>
|
80
147
|
|
81
148
|
<div class="left-box"></div>
|
82
149
|
<div class="right-box">
|
83
|
-
<div
|
150
|
+
<div class="move-in">
|
151
|
+
<table width="100%" border="0">
|
152
|
+
<tbody>
|
153
|
+
<tr>
|
154
|
+
<td>a</td>
|
155
|
+
<td>b</td>
|
156
|
+
<td>c</td>
|
157
|
+
<td>d</td>
|
158
|
+
</tr>
|
159
|
+
</tbody>
|
160
|
+
</table></div>
|
84
161
|
</div>
|
85
162
|
|
86
163
|
|
1
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
ざっくりとしていますが、下記がおおまかなソースです(javascriptの問題と複数のIDの問題と思いますので、CSSは省略しています)。
|
7
7
|
また一応画像にて理想の動きを記しています。
|
8
8
|
|
9
|
+
```
|
9
10
|
<html>
|
10
11
|
<head>
|
11
12
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
|
@@ -84,4 +85,5 @@
|
|
84
85
|
|
85
86
|
|
86
87
|
</body>
|
87
|
-
</html>
|
88
|
+
</html>
|
89
|
+
```
|