第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關(guān)于jquery的animate使用

關(guān)于jquery的animate使用

冬天里的陽光 2017-03-10 18:30:34
大家?guī)兔纯匆韵麓a在執(zhí)行動畫的高度收回來的最后一點時為什么有點卡?<!DOCTYPE html><html><head>? ? <meta http-equiv="Content-type" content="text/html; charset=utf-8" />? ? <title></title>? ? <style>? ? body,div,ul,p,h1,h2,h3.img{ margin:0;padding:0;}ul li{list-style-type:none;}a{ font-size: 1.0625em; text-decoration: none; color:#565656;}#landing{ overflow:hidden;}.fblod{ color: #fff!important; font-weight:blod!important; background: #76afe0!important;}ul#landing li{ float:left; width:32.4%; height:36px; line-height: 36px; background: #ebf2f7; color: #2a70be; margin: 0 5px 0 0; text-align:center;}ul#landing li:nth-child(3){ margin-right: 0;}ul#landing li:nth-child(4){ ?width:99.8%; height:136px; display:none; position: relative; padding-top: 26px;}input,select{display:block; margin: 0 0 10px 20px; width:56%; height:35px;border:1px solid #669fdf; border-radius:5px;}select{ height: 30px;}input:nth-child(2){ margin-bottom: 3px;}input:nth-child(4){ width:70px; height:72px; background-image:linear-gradient(to top,#669fdf,#3177c5); color:white; position:absolute;left:60%;top:66px; }? ? </style>? ? <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script></head><body> <!--點擊展開登陸--> <ul id="landing"> <li onclick ="changeselect('select','1')">TAB1</li> <li onClick="changeselect('select','2')">TAB2</li> <li onClick="changeselect('select','3')">TAB3</li> <li></li> </ul> <script> $('#landing li:eq(0),#landing li:eq(1),#landing li:eq(2)').click(function(){ $('#landing li:eq(3)').animate({height:'toggle'},1000); }) </script></body></html>
查看完整描述

1 回答

已采納
?
習慣受傷

TA貢獻885條經(jīng)驗 獲得超1144個贊

把你代碼中?ul#landing li:nth-child(4) 這一個樣式里的?padding-top: 26px; 去掉就好了。原因是有了padding,那么這個元素高度就變成了26了,所以toggle時,高度從26開始,縮小的時候到26時,隱藏,所以造成了卡頓的假象

查看完整回答
2 反對 回復 2017-03-11
  • 1 回答
  • 1 關(guān)注
  • 1164 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號