简体   繁体   English

如何在 css 文件中添加另一个 css 文件?

[英]How to add another css file inside of css file?

I am making web application.我正在制作网络应用程序。 and I try to optimization in my web page.我尝试在我的网页中进行优化。
So i am working minify css, js files.所以我正在缩小 css、js 文件。

I want to another css file in a css file .我想要一个 css 文件中的另一个 css 文件
As below picture, How to make file in CLI?如下图,如何在 CLI 中制作文件?

在此处输入图片说明

We can do that by importing the css file.我们可以通过导入 css 文件来做到这一点。 The first rule in the style sheet is the @import rule.样式表中的第一条规则是@import 规则。

@import "mystyle.css";
@import url("mystyle.css");

Some Old browsers may not support this one.一些旧浏览器可能不支持这个。

you can refer this link fore example: https://www.geeksforgeeks.org/how-to-include-one-css-file-in-another/您可以参考此链接例如: https : //www.geeksforgeeks.org/how-to-include-one-css-file-in-another/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM