编写jQuery代码

2017-06-26 16:30:00
admin
原创
350
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Through the Looking-Glass</title>

    <style>
		/***************************************
   Default Styles
************************************** */

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 62.5% Verdana, Helvetica, Arial, sans-serif;
  color: #000;
  background: #fff;
}
#container {
  font-size: 1.2em;
  margin: 10px 2em;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 0;
}

h2 {
  font-size: 1.3em;
  margin-bottom: .5em;
}
h3 {
  font-size: 1.1em;
  margin-bottom: 0;
}

code {
  font-size: 1.2em;
}

a {
  color: #06581f;
}


/***************************************
   Chapter Styles
************************************** */

.poem {
  margin: 0 2em;
}

.highlight {
  background-color: #ccc;
  border: 1px solid #888;
  font-style: italic;
  margin: 0.5em 0;
  padding: 0.5em;
}

	</style>

    <script src="http://code.ybao.org/js/jquery.js"></script>
    <script>
	  $(document).ready(function() {
        $('div.poem-stanza').addClass('highlight');
      });
	</script>
  </head>
  <body>
    <div id="container">
      <h1>Through the Looking-Glass</h1>
      <div class="author">by Lewis Carroll</div>

      <div class="chapter" id="chapter-1">
        <h2 class="chapter-title">1. Looking-Glass House</h2>
        <p>There was a book lying near Alice on the table, and while she sat watching the White King (for she was still a little anxious about him, and had the ink all ready to throw over him, in case he fainted again), she turned over the leaves, to find some part that she could read, <span class="spoken">“—for it’s all in some language I don’t know,”</span> she said to herself.</p>
        <p>It was like this.</p>
        <div class="poem">
          <h3 class="poem-title">YKCOWREBBAJ</h3>
          <div id="fred" class="poem-stanza">
            <div>sevot yhtils eht dna ,gillirb sawT'</div>
            <div>;ebaw eht ni elbmig dna eryg diD</div>
            <div>,sevogorob eht erew ysmim llA</div>
            <div>.ebargtuo shtar emom eht dnA</div>
          </div>
        </div>
        <p>She puzzled over this for some time, but at last a bright thought struck her. <span class="spoken">“Why, it’s a Looking-glass book, of course! And if I hold it up to a glass, the words will all go the right way again.”</span></p>
        <p>This was the poem that Alice read.</p>
        <div class="poem">
          <h3 class="poem-title">JABBERWOCKY</h3>
          <div class="poem-stanza">
            <div>'Twas brillig, and the slithy toves</div>
            <div>Did gyre and gimble in the wabe;</div>
            <div>All mimsy were the borogoves,</div>
            <div>And the mome raths outgrabe.</div>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
文章分类
联系我们
电话: 18902328227
Email: 2689701946@qq.com
QQ: 2689701946
微信: 18902328227
地址: 广州番禺区繁华路
  • 在线客服
  • 关注微信
  • 联系电话
    • 欢迎咨询
    • 欢迎加入QQ群 303257430
  • 公众号:源宝网络
    • 联系电话及微信号 18902328227