html布局问题

html布局问题,第1张

<code><form action="9in8.php" method="post"> <div><label>权限组名称</label> <input style="width:400px" type="text" name="title" id="inputString" autocomplete="off" onkeyup="lookup(this.value)" onblur="fill()"/> </div> <div class="suggestionsBox" id="suggestions"> <div class="suggestionList" id="autoSuggestionsList"> <li onClick="fill(\''所以'\')">所以我想知道这里到底能装多少字</li> </div> </div> <button type="submit" class="btn btn-primary" data-toggle="modal">提交 </button></form></code>css:<code> .suggestionsBox { position: relative left: 272px margin-top: -2px } .suggestionList { width:290px margin: 0px padding: 0px } .suggestionList li { width:280px margin: 0px padding: 0px cursor: pointer list-style-type: nonetext-align: left } .suggestionList li:hover { background-color: #659CD8 } </code>

把text-align:right改成text-align:left

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Document</title>

</head>

<style>

body{

background: yellow

}

.d1{

position: relative

width: 900px

padding: 30px

margin: 40px auto

height: 130px

background: skyblue

}

.d2{

position: relative

float: left

width: 120px

height: 100px

background: green

}

.d3{

position: relative

float: right

width: 100px

height: 90px

background: pink

}

</style>

<body>

<div class="d1">

<div class="d2"></div>

<div class="d3"></div>

</div>

</body>

</html>

具体大小 颜色自己配


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/7066735.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-01
下一篇 2023-04-01

发表评论

登录后才能评论

评论列表(0条)

保存