有没有办法按比例缩小或放大整个 css 文件?
这对你来说可能是显而易见的,但我绝对一无所知。我基本上有一堆工作正常的 css,但看起来太大了。我想将其切成四分之一,而不需要深入研究并更改每个值。例如,我想要很多这样的东西:
#p1
{
width: 1285px;
height: 1388px;
overflow: hidden;
z-index: 1;
}
更改为这样的东西:
#p1
{
width: 321px;
height: 347px;
overflow: hidden;
z-index: 1;
}
我只想保留功能,但缩小它以更好地适应页面。请告诉我,除了使用计算器和耐心之外,还有一种方法可以做到这一点。
This may be obvious to you, but I'm definitely clueless. I basically have a bunch of css that works fine, but appears way to large. I want to cut it into a quarter without going into it and changing each and every value. For instance I'd like many things like this:
#p1
{
width: 1285px;
height: 1388px;
overflow: hidden;
z-index: 1;
}
to change into something like this:
#p1
{
width: 321px;
height: 347px;
overflow: hidden;
z-index: 1;
}
I just want to retain the functionality but shrink it to fit better on the page. Please tell me there's a way to do this outside of using a calculator and a whole lot of patience.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你应该看看LESS。
You should have a look at LESS.
或者编写一个脚本对数字执行正则表达式,将它们除以 x,然后更新它们?
Or write a script that performs a regex on the numbers, divides them by x, and updates them?