显示/隐藏 文章的按钮(有背景)
这个版本的有背景,比较漂亮哟、而且非常的有趣。假期好闷所以发了很多的教程、喜欢我部落格的话麻烦多多关注+宣传哦。#交换链接非常的乐意哦#
1. 到 Design > Edit HTML 。
1.Go to Design>Edit HTML.
2.Ctrl+F寻找</head>或者</html>。
2.Use Ctrl+f to find </head> or </html>.
3.把以下的 code copy and paste 进去 <head>。
3.Copy and paste the code and put into<head>.
#拷贝下面的代码哦#
#Copy the code down there#
<center><div id="spoiler">
<div>
<input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" style="-moz-border-radius: 5px; background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEielLyNhwJLk6Hd9NRIevXE2zwvXWHHBb2WH7di8zo27QMrXW8VU2SduoWrm4tuDlIjd5mYjsYhVhGbf22cHc8p3-E-ujLqRoXRaNEEO65gp33FMwnmgS92H8lZ98S1rkYw0pSaZLJjUhk/s1600/h1.gif); border-radius: 5px; border-style: 2px solid #ff9fcc; font-size: 12px; margin: 13px; padding: 0px; width: 250px;" type="button" value="点我显示" />
<div id="show" style="background-color: transparent; background-repeat: repeat; border-width: 0px; display: none; margin: 0px; padding: 3px; width: 90%;">
欢迎大家来到我的部落格!</div>
</div>
</div></center>
#凡是highlight红色的字、都可以改哦。#
#Can change the highlight word.#