Breakpoint sass mixin



非常简单的HTML SASS为什么断点不起作用,不更改背景,也不扩展表的大小HTML<table >nocontent</table>

CSS

$lg: 992px;
$xl: 1200px;
$xxl: 1400px;
$md : 768px;
@mixin for-up($size) {
@media screen and (max-device-width: $size) {
@content;
}
.table-main {
height: 100vh;
border: greenyellow solid;
@include for-up($sm)
{
background-color: black;
width: 100%;
max-width: none;
}
}
}
$md : 768px;
@mixin for-up($size) {
@media screen and (max-device-width: $size) {
@content;
}
.table-main {
height: 100vh;
border: greenyellow solid;
@include for-up($md)
{
background-color: black;
width: 100%;
max-width: none;
}
}
}

只要加上合适的起始和结束括号,就可以了。

最新更新