欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          jquery怎么清除元素max-width(最大寬度)

          清除max-width的方法:1、使用css(),語法“$("指定元素").css("max-width","none")”;2、使用attr(),語法“$("指定元素").attr("style","max-width:none;")”。

          jquery怎么清除元素max-width(最大寬度)

          本教程操作環(huán)境:windows7系統(tǒng)、jquery1.10.2版本、Dell G3電腦。

          元素的max-width樣式

          max-width屬性設(shè)置元素的最大寬度。

          <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">   </head>   <body>   	<textarea>文本框默認(rèn)寬度</textarea><br>     <textarea style="max-width: 400px;">文本框最大寬度400px</textarea>   </body> </html>

          jquery怎么清除元素max-width(最大寬度)

          jquery怎么清除元素max-width(最大寬度)

          方法1:使用css()將max-width的值設(shè)置為none

          <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script> 			$(document).ready(function() { 				$("button").click(function() { 					$("textarea").css("max-width","none"); 				}); 			}); 		</script> 		<style type="text/css"> 			textarea{ 				max-width: 300px; 			} 		</style> 	</head> 	<body> 		<textarea>文本框最大寬度300px</textarea><br><br> 		<button>清除max-width</button>  	</body> </html>

          jquery怎么清除元素max-width(最大寬度)

          2、使用attr()將max-width的值設(shè)置為none

          <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script> 			$(document).ready(function() { 				$("button").click(function() { 					$("textarea").attr("style","max-width:none"); 				}); 			}); 		</script> 		<style type="text/css"> 			textarea{ 				max-width: 300px; 			} 		</style> 	</head> 	<body> 		<textarea>文本框最大寬度300px</textarea><br><br> 		<button>清除max-width</button>  	</body> </html>

          jquery怎么清除元素max-width(最大寬度)

          【推薦學(xué)習(xí):jQuery視頻教程、web前端視頻】

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)