【发布时间】:2020-09-07 17:26:33
【问题描述】:
我正在学习 HTML 并尝试制作表单。我现在的问题是并排设置两个下拉列表,而不是一个在另一个之上。这是代码(我删除了不必要的代码,但如果您认为我应该提供它,请告诉我):
body {margin:0; background-color:rgb(56, 0, 121)}
.org-bar {
margin: 10%;
width: 400px;
background-color: rgba(255, 255, 255, 1);
overflow: hidden;
border-radius: 15px 15px 15px 15px;
padding: 16px;
}
.textInput {
margin-top: 20px;
font-size: 15px;
padding: 10px;
width: 250px;
}
.org-bar h1 {
text-align: center;
padding: 16px;
transition: all 0.3s ease;
color: rgb(0, 0, 0);
font-size: 27px;
text-transform: uppercase;
font-family: 'Arial'
}
.org-bar label {
display: block;
text-align: left;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
<!DOCTYPE html>
<html>
<head><link rel="stylesheet" href="common.css"></head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<div class="org-bar">
<h1>Panel</h1>
<form>
<label for="orgType"></label>
<select name="orgType" id="orgType">
<option disabled="disabled" selected="selected">Type</option>
<option value="gang">1</option>
<option value="terrorist">2</option>
</select>
<label for="orgStyle"></label>
<select name="orgStyle" id="orgStyle">
<option disabled="disabled" selected="selected">Style</option>
<option value="gang">1</option>
<option value="classic">2</option>
</select>
<button class="btn btn--radius btn--green" type="submit">Search</button>
</form>
</div>
</body>
</html>
这是表格:
【问题讨论】:
-
every-layout.dev 从这里开始。这是一个很好的布局资源。
-
已经付钱了 ::
-
(点击菜单项,有些是免费的,而且互相支持也不错)---还有csslayout.io,但不利于无障碍
标签: javascript html css forms