gpt4 book ai didi

css - 在 Sass 中重复单个声明的最佳方法是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 20:28:31 24 4
gpt4 key购买 nike

在我的元素中,我有许多元素将采用此属性 text-align: center
我们怎样才能避免使用 Sass 在所有元素中编写此声明?

换句话说,有没有更有效的方法来做这样的事情:

.one {
text-align: center;
}
.two {
text-align: center;
}

最佳答案

尝试使用纯 CSS 的力量!

.one, .two {
text-align: center;
}

关于css - 在 Sass 中重复单个声明的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47978184/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com