Skip to content

Commit

Permalink
update website
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed May 12, 2017
1 parent e3d8411 commit ea9609a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Then use **alimask(text, options)** API.
```js
alimask('王小为(小为) 888888');

alimask('王小为(小为) 888888', { color: 'green' });
alimask('王小为(小为) 888888', { color: '#f6dcd7' });
```


Expand Down
17 changes: 12 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
body {
max-width: 1000px;
margin: 0 auto;
padding: 10px 20px;
}
pre {
background-color: #f6dcd7;
/*background-color: #f6dcd7;*/
border: 1px solid #f6dcd7;
border-radius: 3px;
padding: 10px 15px;
white-space: pre-wrap;
word-wrap: break-word;
}
pre.strong {
font-weight: bold;
}
</style>
Expand All @@ -39,7 +40,7 @@ <h1> alimask </h1>
</script>

<h2> Install </h2>
<pre class="strong">
<pre>
npm install alimask </pre>
<p> Then import it. </p>
<pre>
Expand All @@ -55,7 +56,7 @@ <h2> Install </h2>

<h3>Usage</h3>
<pre>
var base64 = alimask('王小为(小为) 888888', {});
var base64 = alimask('王小为(小为) 888888');
</pre>
<hr />

Expand All @@ -65,6 +66,12 @@ <h3>Usage</h3>
<script type="text/javascript" src="dist/alimask.min.js"></script>
<script type="text/javascript">
document.body.style.background = 'url(' + alimask('王小为(小为) 888888') + ')';
var pres = document.querySelectorAll('pre');
var prebg = alimask('小为(hustcc)666666', {color: '#f6dcd7'});
for (var i = pres.length - 1; i >= 0; i--) {
pres[i].style.background = 'url(' + prebg + ')';
}
document.body.style.background = 'url(' + alimask('王小为(小为) 888888') + ')';
</script>
</body>
</html>

0 comments on commit ea9609a

Please sign in to comment.