border-left: 1px solid red;中的solid 还可以换成扫描
时间: 2024-04-27 17:23:15 浏览: 7
`border-left: 1px dashed red;` 将边框样式由 `solid` 改为 `dashed`,这样边框就变成了红色虚线。`dashed` 是 CSS 中的一个边框样式属性值,表示虚线边框样式。其他常见的边框样式属性值还有 `dotted`(点线样式)、`double`(双线样式)和 `none`(无边框样式)等。可以根据实际需要选择不同的边框样式。
相关问题
#table{ width: 70%; height: auto; background-color: aqua; top: 600px; border-radius: 15px; } #table .classification{ width: 100%; height: 30px; text-align: left; margin-left: 20px; top: 10px; border: 1px solid red; } #table .content{ font-style: '宋体'; margin-left: 20px; margin-top: 10px; } #table .time{ float: right; } #table .name{ float: right; } 怎么让这四个类分别在一行
您可以使用 `display: inline-block;` 或者 `float: left/right;` 把这四个类放在同一行。例如:
```
#table {
width: 70%;
height: auto;
background-color: aqua;
border-radius: 15px;
}
#table .classification {
display: inline-block;
width: 30%;
height: 30px;
text-align: left;
margin-left: 20px;
border: 1px solid red;
}
#table .content {
display: inline-block;
font-style: '宋体';
width: 30%;
margin-left: 20px;
margin-top: 10px;
}
#table .time {
display: inline-block;
float: right;
width: 30%;
}
#table .name {
display: inline-block;
float: right;
width: 30%;
}
```
或者:
```
#table {
width: 70%;
height: auto;
background-color: aqua;
border-radius: 15px;
}
#table .classification {
float: left;
width: 30%;
height: 30px;
text-align: left;
margin-left: 20px;
border: 1px solid red;
}
#table .content {
float: left;
font-style: '宋体';
width: 30%;
margin-left: 20px;
margin-top: 10px;
}
#table .time {
float: right;
width: 30%;
}
#table .name {
float: right;
width: 30%;
}
```
注意,需要根据具体情况调整每个元素的宽度和位置。
把这段less代码,转换成scss代码:.select-box { height: 420px; overflow-y: auto; li { padding: 5px 0; i { float: right; padding-left: 24px; padding-right: 10px; color: #3195f8; font-size: 12px; cursor: pointer; background: url(~@/assets/images/next_level_active.png) no-repeat 10px center; border-left: 1px solid rgb(238, 238, 238); } a.active+i { color: rgb(197, 197, 197); background-image: url(~@/assets/images/next_level.png); pointer-events: none; } img { width: 14px; vertical-align: middle; margin-right: 5px; } } }
.select-box {
height: 420px;
overflow-y: auto;
li {
padding: 5px 0;
i {
float: right;
padding-left: 24px;
padding-right: 10px;
color: red;
}
}
}
转换后的 SCSS 代码如上。