課程
/前端開發
/jQuery
/jQuery基礎(二)—DOM篇
圖一:
圖二:
還有解釋下空行是怎么來的
2018-06-13
源自:jQuery基礎(二)—DOM篇 5-2
正在回答
<!DOCTYPE?html> <html> ? <head> ????<meta?http-equiv="Content-type"?content="text/html;?charset=utf-8"?/> ????<title></title> ????<style> ????????*{ ????????????margin:?0; ????????????padding:?0; ????????} ????????.left{ ????????????width:?300px; ????????????height:?150px; ????????????background:?#ddd; ????????????border:?none; ????????} ????????p{ ????????????height:?30px; ????????????background-color:?yellow; ????????????color:?#000; ????????} ????????div{ ????????????color:?#fff; ????????????height:?30px; ????????????background-color:?blue; ????????????border:?1px?solid?red; ????????} ????</style> ????<script?src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"> ????</script> </head> ? <body> <div?class="left"> ????<p>wqqwqwqw</p> ????<div?id="1">11111</div> ????<div?id="2">22222</div> ????<div?id="3">33333</div> </div> <script?type="text/javascript"> ????$('#3').replaceWith($('#1')); </script> </body> ? </html>
我自己做的例子
主宰靈魂 提問者
去除瀏覽器默認css樣式,最基本的方式:
*{? ? ? ? ? ? margin: 0;? ? ? ? ? ? padding: 0;? ? ? ? }
*{
? ? ? ? ? ? margin: 0;
? ? ? ? ? ? padding: 0;
? ? ? ? }
舉報
jQuery第二階段開啟DOM修煉,了解創建、插入、刪除與替換
8 回答if (!$("p").length) return; 去重 有大神能解釋下去重是什么鬼?
2 回答結果為什么會成這樣?
2 回答$("p").filter(":contains('3')").remove()中的filter什么意思 求大神解答
3 回答哪個大神知道下面這段代碼在這里有什么作用
2 回答為什么.right的背景顏色這么大?代碼中已注釋問題地點
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-06-13
我自己做的例子
2018-06-13
去除瀏覽器默認css樣式,最基本的方式: