After following, you can keep track of his dynamic information in a timely manner
Courses in the relevant section:CSS pagination
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>分頁(yè)</title> <style type="text/css"> ul{ list-style:none; /*去除li標(biāo)簽的默認(rèn)樣式,前面的黑點(diǎn)*/ } ul li a{ float:left; text-decoration:none; display:block; width:30px;height:25px; border:1px solid #ccc; text-align:center; padding-top:3px; color:red; border-radius:10px; margin:0 3px; font-size:20px; } a:hover{ background:#ccc; } a:active{ background:#666; } </style> </head> <body> <ul> <li><a href="#"><<</a></li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#">>></a></li> </ul> </body> </html>
2016-12-060個(gè)贊
Courses in the relevant section:CSS3 box size
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> .div{ width:250px; height:150px; border:1px solid red; box-sizing:border-box; padding-left:70px; padding-top:50px; /* 默認(rèn)情況下,div的寬度 = 邊框 2px + width值 + padding-left值 div的高度 = 邊框 2px + height值 + padding-top值 */ } </style> </head> <body> <div class="div">php中文網(wǎng)</div> </body> </html>
2016-12-060個(gè)贊
Courses in the relevant section:CSS3 flexible box
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>彈性盒子</title> <style type="text/css"> #dv{ width:450px; height:400px; background:#eee; display:flex; /*IE8 不支持彈性盒子*/ } .div{ width:100px; height:100px; background:#f60; margin:3px; } </style> </head> <body> <div id="dv"> <div class="div">盒子1</div> <div class="div">盒子2</div> <div class="div">盒子3</div> </div> </body> </html>
2016-12-060個(gè)贊
Courses in the relevant section:CSS3 multimedia queries
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> body { background-color: pink; } @media screen and (min-width: 480px) { body { background-color: lightgreen; } } </style> </head> <body> <h1>重置瀏覽器窗口查看效果!</h1> <p>如果媒體類型屏幕的可視窗口寬度小于 480 px ,背景顏色將改變。</p> </body> </html>
2016-12-060個(gè)贊
Courses in the relevant section:Introduction to jQuery
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); }); </script> </head> <body> <p>如果你點(diǎn)擊“隱藏” 按鈕,我將會(huì)消失。</p> <button id="hide">隱藏</button> <button id="show">顯示</button> </body> </html>
2016-12-050個(gè)贊
Courses in the relevant section:jQuery environment construction
<script> $(document).ready(function(){ $("button").click(function(){ $("p").hide(); }); }); </script>
2016-12-050個(gè)贊
Courses in the relevant section:jQuery syntax
$(this).hide() - 隱藏當(dāng)前元素 $("p").hide() - 隱藏所有 <p> 元素 $("p.test").hide() - 隱藏所有 class="test" 的 <p> 元素 $("#test").hide() - 隱藏所有 id="test" 的元素
2016-12-050個(gè)贊
Courses in the relevant section:jQuery selector
jQuery 元素選擇器基于元素名選取元素 jQuery #id 選擇器通過 HTML 元素的 id 屬性選取指定的元素 jQuery 類選擇器可以通過指定的 class 查找元素
2016-12-050個(gè)贊
Courses in the relevant section:jQuery events
mousedown() 當(dāng)鼠標(biāo)在元素上點(diǎn)擊后觸發(fā)。 mouseenter() 當(dāng)鼠標(biāo)在元素上穿過時(shí)觸發(fā)。 mouseleave() 當(dāng)鼠標(biāo)從元素上移出時(shí)觸發(fā)。 mousemove() 當(dāng)鼠標(biāo)在元素上移動(dòng)時(shí)觸發(fā)。.clientX 和 .clientY分別代表鼠標(biāo)的X坐標(biāo)與Y坐標(biāo)。 mouseout() 當(dāng)鼠標(biāo)從元素上移開時(shí)觸發(fā)。 mouseover() 當(dāng)鼠標(biāo)移入元素時(shí)觸發(fā)。 mouseup() 當(dāng)鼠標(biāo)左鍵按下釋放時(shí)觸發(fā)。 resize() 當(dāng)瀏覽器窗口大小改變時(shí)觸發(fā)。 $(window).resize(); scroll() 當(dāng)滾動(dòng)條發(fā)生變化時(shí)觸發(fā)。 select() 當(dāng)input里的內(nèi)容被選中時(shí)觸發(fā)。 submit() 提交選中的表單。 unload() 當(dāng)頁(yè)面卸載時(shí)觸發(fā)。
2016-12-050個(gè)贊
Courses in the relevant section:jQuery effects
fadeIn() 用于淡入已隱藏的元素 fadeToggle() 方法可以在 fadeIn() 與 fadeOut() 方法之間進(jìn)行切換 fadeTo() 方法允許漸變?yōu)榻o定的不透明度(值介于 0 與 1 之間) slideDown() 方法用于向下滑動(dòng)元素
2016-12-050個(gè)贊
Courses in the relevant section:jQuery-capture
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ alert($("#php").attr("href")); }); }); </script> <p><a href="http://ipnx.cn" id="php">php中文網(wǎng)</a></p> <button>顯示 href 屬性的值</button>
2016-12-050個(gè)贊
Courses in the relevant section:jQuery-settings
text()、html() 以及 val(),同樣擁有回調(diào)函數(shù)?;卣{(diào)函數(shù)由兩個(gè)參數(shù):被選元素列表中當(dāng)前元素的下標(biāo),以及原始(舊的)值。然后以函數(shù)新值返回您希望使用的字符串
2016-12-050個(gè)贊
Courses in the relevant section:jQuery - add/remove elements
append() - 在被選元素的結(jié)尾插入內(nèi)容 prepend() - 在被選元素的開頭插入內(nèi)容 after() - 在被選元素之后插入內(nèi)容 before() - 在被選元素之前插入內(nèi)容
2016-12-050個(gè)贊
Courses in the relevant section:Introduction to AJAX
使用文檔對(duì)象模型(DocumentObjectModel)作動(dòng)態(tài)顯示和交互 使用XML和XSLT做數(shù)據(jù)交互和操作 使用XMLHttpRequest進(jìn)行異步數(shù)據(jù)接收 使用JavaScript將它們綁定在一起
2016-12-050個(gè)贊
Courses in the relevant section:jQuery-CSS classes and methods
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").css({"background-color":"yellow","font-size":"200%"}); }); }); </script> </head> <body> <p style="background-color:#ff0000">這是一個(gè)例子</p> <p style="background-color:#00ff00">這是一個(gè)例子</p> <p style="background-color:#0000ff">這是一個(gè)例子</p> <button>為 p 元素設(shè)置多個(gè)樣式</button> </body> </html>
2016-12-050個(gè)贊