#container { display: flex; flex-direction: row; } #menu { background-color: #333; color: #fff; width: 200px; height: 500px; } #menu ul { list-style-type: none; margin: 0; padding: 0; } #menu li a { display: block; color: #fff; padding: 10px 20px; text-decoration: none; } #menu li a:hover { background-color: #555; } #main { height: 500px; /*设定主体内容高度*/ overflow-y: scroll; /*添加滚动条*/ max-width: 1000px; padding: 20px; background-color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.1); } .form-row { margin-bottom: 10px; } label { display: inline-block; width: 120px; text-align: right; margin-right: 16px; } input[type="text"], select, button[type="submit"] { width: 300px; height: 36px; border-radius: 2px; border: 1px solid #ccc; padding: 6px 12px; font-size: 14px; box-sizing: border-box; background-color: #f8f8f8; } button[type="submit"] { background-color: #1E9FFF; color: #main select { appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 10 6" xmlns="http://www.w3.org/2000/svg"><path d="M 5,0 10,6 H 0 Z"/></svg>'); background-repeat: no-repeat; background-position-x: calc(100% - 12px); background-position-y: center; } button[type="submit"]:hover { background-color: #0C7DBE; } button[type="submit"]:active { background-color: #0B6994; } img { width: 200px; height: auto; margin-left: 10px; border: none; }請你幫我將所有進行注解
时间: 2024-04-01 15:36:50 浏览: 79
/* CSS代码注释开始 */
/* 容器样式 */
#container {
display: flex;
flex-direction: row;
}
/* 菜单样式 */
#menu {
background-color: #333;
color: #fff;
width: 200px;
height: 500px;
}
#menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#menu li a {
display: block;
color: #fff;
padding: 10px 20px;
text-decoration: none;
}
#menu li a:hover {
background-color: #555;
}
/* 主体内容样式 */
#main {
height: 500px; /* 设定主体内容高度 */
overflow-y: scroll; /* 添加滚动条 */
max-width: 1000px;
padding: 20px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
/* 表单样式 */
.form-row {
margin-bottom: 10px;
}
label {
display: inline-block;
width: 120px;
text-align: right;
margin-right: 16px;
}
input[type="text"], select, button[type="submit"] {
width: 300px;
height: 36px;
border-radius: 2px;
border: 1px solid #ccc;
padding: 6px 12px;
font-size: 14px;
box-sizing: border-box;
background-color: #f8f8f8;
}
/* 提交按钮样式 */
button[type="submit"] {
background-color: #1E9FFF;
color: #fff;
}
/* 下拉列表样式 */
main select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 10 6" xmlns="http://www.w3.org/2000/svg"><path d="M 5,0 10,6 H 0 Z"/></svg>');
background-repeat: no-repeat;
background-position-x: calc(100% - 12px);
background-position-y: center;
}
/* 按钮悬浮样式 */
button[type="submit"]:hover {
background-color: #0C7DBE;
}
/* 按钮按下样式 */
button[type="submit"]:active {
background-color: #0B6994;
}
/* 图片样式 */
img {
width: 200px;
height: auto;
margin-left: 10px;
border: none;
}
/* CSS代码注释结束 */
阅读全文