html - 一个盒子里的html表单?
问题描述
我想把一个表格放在一个盒子里,或者在表格周围有一个边框,但我卡住了。背景必须是白色的,我想也许一个透明的选项是可以的。那里的任何专家都有一些简单的想法如何解决它?附上一些代码。提琴手
<body>
<div id="border"></div>
<div id="text">Auf dem tisch</div>
</body>
body {background: white;}
#border {
border: 2px solid black;
position: absolute;
z-index: 1;
width: 100px;
height: 80px;
margin-center: 0;
padding: 15px;
border-radius: 1px;
background: navy;
opacity: 0.2;
}
#text {
margin-center: 0;
z-index: 2;
color: black;
font-weight: bold;
}
解决方案
<div class="box">
<form>
..
..
</form>
</div>
// css style to make border in center of the form
.box{
margin:0 auto;
width:600px //you can set it in %.
padding:20px;
background:#f9f9f9;
border:2px solid #333;
}
推荐阅读
- loops - pySpark 迭代重复变量
- python - 使用python从包含表格网格的图像中提取数据
- symfony - 如何在 php7 中将父数据对象扩展到子对象以访问父数据 Symfony 5
- rust - 无法使用 RwLock 和 HashMap 向下递归树
- python - Pandas:计算包含单词且不包含其他单词的出现次数
- c++ - 'pow' 没有匹配的函数
- python - 如何在 Python 上为游戏构建 20x20 板?
- python - 岭回归 B 系数计算
- java - 什么 Java 版本最适合在 Raspberry pi 3 上运行 Java 应用程序
- c# - 如何在 C# 中创建搜索框并以另一种形式显示值?