recommend using SRI hashes and crossover
attributes (#647)
This commit is contained in:
parent
23787fcc49
commit
c420b285ce
14
README.md
14
README.md
|
@ -24,10 +24,20 @@ $ npm install animate.css --save
|
||||||
<link rel="stylesheet" href="animate.min.css">
|
<link rel="stylesheet" href="animate.min.css">
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
or use the version hosted by [CDNJS](https://cdnjs.com/libraries/animate.css)
|
Instead of installing you may use the remote version (hosted by [CDNJS](https://cdnjs.com/libraries/animate.css)):
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
|
<link rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
|
||||||
|
</head>
|
||||||
|
```
|
||||||
|
You may [generate a SRI hash](https://www.srihash.org/) of that particular version and then use it to ensure the file's integrity; also you can make anonymous requests to CDN by setting the corresponding [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute:
|
||||||
|
```html
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"
|
||||||
|
integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
|
||||||
|
crossorigin="anonymous">
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
2. Add the class `animated` to the element you want to animate.
|
2. Add the class `animated` to the element you want to animate.
|
||||||
|
|
Loading…
Reference in a new issue