【发布时间】:2016-06-26 15:12:19
【问题描述】:
我正在尝试清理我的大量媒体查询,并且我已经删除了元素值中与默认元素值相同的所有更改,以便改为显示。
我的问题是,当重复值存储在单个媒体查询中时,我有哪些选择?
这是一个例子:
@media only screen and (min-width: 480px) and (max-width: 767px) {
.fa.fa-check
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
.fa.fa-shopping-cart
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
.fa.fa-user
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
@media only screen and (max-width: 479px) {
.fa.fa-check
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
.fa.fa-shopping-cart
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
.fa.fa-user
{
font-size: 3em;
border-radius: 100px;
height: 100px;
line-height: 100px;
width: 100px;
}
我有很多元素值的变化,这些变化在媒体查询中也不重复,所以我不能将它们全部组合在一起。还有其他选择吗?
【问题讨论】:
标签: html css duplicates media-queries elements