当与 integrity
和 crossorigin
选项一起包含时,Bootstrap.css 不起作用。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
但是,删除这些选项有效。这是否意味着完整性无效?
最佳答案
我强烈建议使用 bootstrapcdn.com 上列出的内容,其中包括 sha256
和 sha512
。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous">
关于html - 具有完整性的 Bootstrap MaxCDN 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35007551/