我想知道使用样式作为Blob链接有什么好处和区别:
<link rel="stylesheet" href="blob:http://www.domain.com/hash-here">
Run Code Online (Sandbox Code Playgroud)
超过标准标签:
<style>...</style>
Run Code Online (Sandbox Code Playgroud)
我的意思是Blob创建如下:
var blob = new Blob([css_here], {type: 'text/css'});
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = window.URL.createObjectURL(blob);
head.appendChild(link);
Run Code Online (Sandbox Code Playgroud)
提前致谢.