我想用另一个类定位一个div和另一个类,这基本上就是我想要做的:
.footer {
position: sticky;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #2f2f2f;
.container {
width: auto;
max-width: 680px;
padding: 0 15px;
.text-muted {
margin: 20px 0;
}
}
}但是我不能将类选择器放在其他类中,我应该开始使用更少的、更少的或者其他类型的CSS框架吗?
致以敬意,
发布于 2016-06-29 10:49:45
您可以使用纯css实现这样的功能:
.footer {
position: sticky;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #2f2f2f;
}
.footer .container {
width: auto;
max-width: 680px;
padding: 0 15px;
}
.footer .container .text-muted {
margin: 20px 0;
}https://stackoverflow.com/questions/38097356
复制相似问题