📜  javascript 添加 css 文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:57.787000             🧑  作者: Mango

代码示例4
var cssFile = document.createElement('link');
    cssLink1.rel = 'stylesheet';
    cssLink1.href = "styles.css";  // or path for file {themes('/styles/mobile.css')}
    document.head.appendChild(cssFile); // append css to head element