HTML 表格:左侧标题,右侧输入框 | 代码示例
<!DOCTYPE html>
<html>
<head>
<title>表格</title>
<style>
.container {
display: flex;
flex-direction: row;
}
.left {
width: 30%;
background-color: lightblue;
padding: 10px;
text-align: center;
}
.right {
width: 70%;
background-color: lightgreen;
padding: 10px;
}
</style>
</head>
<body>
<div class='container'>
<div class='left'>
<h2>标题</h2>
</div>
<div class='right'>
<input type='text' placeholder='请输入内容'>
</div>
</div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/nIsv 著作权归作者所有。请勿转载和采集!