~~~
<title>Document</title>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<style>
#test{
width:100px;
height:100px;
background: red;
}
</style>
</head>
<body>
<div id="test">
</div>
<button id="btn">切換</button>
<script>
/* show hide
is(":visible") -->返回boolean值,判斷元素是否可見
toggle() -->在show和hide之間切換
*/
$("#btn").click(function(){
// console.log($("#test").is(":visible"))
// if($("#test").is(":visible")){
// $("#test").hide(1000)
// }else{
// $("#test").show(1000)
// }
$("#test").toggle(1000)
})
</script>
</body>
~~~
- 第一天 Git
- 1.ssh的配置
- 2.ssh下載與上傳
- 3.版本回退
- 第二天 html-css
- 1.Markdown語法
- 2.html
- 01
- 02選擇器
- 03demo
- 04盒子模型
- 05樣式重置
- 06水平居中
- 3.css
- 第三天 html-css
- 1.margin
- 2.padding
- 3.demo
- 4.html標簽的分類
- 5.原理
- 6.水平居中
- 7.內聯,內聯塊的水平居中
- 8.分組選擇器
- 9.后代選擇器
- 10.兄弟選擇器
- 11.偽類
- 12.偽元素
- 13.優先級別
- 14.權重
- 第四天 html-css
- 1.鏈接
- 2.table
- 3.跨列表格
- 4.跨行表格
- 第五天
- 01.垂直水平居中
- 02.css樣式
- 03.width,height的繼承
- 04.垂直水平phone
- 06.nav
- 07.基礎語法
- 08.for,if-else
- 09.對象
- 10.DOM
- 11.事件
- 12.jquery
- 13.點擊變色
- 14.顯示和隱藏
- 15.滾動頂部
- 第六天
- 01.margin的問題
- 02.margin
- 03.input
- 04.form
- 05.單選框
- 06.input與btn的區別
- 07.nav
- 08.jquery
- 09.獲取input的值
- 10.vue