正在回答 回答被采纳积分+1
3回答
好帮手慕星星
2019-08-16 11:36:34
你好,
之前老师粘贴的代码中已经设置了表单项背景颜色为透明色,添加上就不是白色的了。
上下间距可以用margin值实现。给你举一个例子:
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 42 43 44 45 46 | <!DOCTYPE html> < html > < head > < meta charset = "UTF-8" > < title >Document</ title > < style type = "text/css" > * { padding: 0; margin: 0; } body { background: #000; } form { width: 400px; height: 300px; text-align: center; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; } input { width: 300px; height: 30px; border: 2px solid #ccc; background: transparent; margin-top: 20px; } </ style > </ head > < body > < form > < input type = "text" > < input type = "text" > </ form > </ body > </ html > |
自己可以测试下哦。
慕粉1940476211
2019-08-16 09:53:34
这块采用了表格进行排版可以吗?
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧