随笔分类 - Css随笔
摘要:案例如下: .parent{ width:500px; height:500px; background-color: #ccc; } .child{ background-color: red; color:#fff; width:100px; height:50px; } <div class=
阅读全文
摘要:在一次使用less的项目中发现在使用calc计算高度的时候无法成功,页面显示的高度为: height:calc(-100%) 而我们在代码中写的是: height:calc( 100% - 500px); 发现计算是失败的,这时候可以使用 height:calc(~"100% - 500px");
阅读全文
摘要:这是因为当前版本与4.0.0不兼容 卸载当前版本sass: npm uninstall node-sass 安装指定版本sass: npm install node-sass@4.14.1
阅读全文
摘要:在icon图标的引用处加上 vertical-align: -10%; 这样就可以解决了。
阅读全文
摘要:方法如下 height:calc(100% - 20px); 值得注意的是减号左右空开
阅读全文