Jquery input¿Ø¼þµÄCSS¿ØÖÆ
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Zend Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery test</title>
</head>
<style>
.lastp{border:2px solid $red;}
.firstp{color:red;}
.hignlight{background:gray;}
.dd{width:20px;height:20px;border:2px solid}
</style>
note£º jequery api º¯ÊýÇø·Ö´óСд
<script src="jquery.js"></script>
<script>
$(document).ready(function(){
$("div.d1").fadeOut("slow");
$("p").filter(".ppp");
$("img.img1").attr(//Ϊָ֮¶¨ÔªËØ£¨×飩Ìí¼ÓÖ¸¶¨ÊôÐÔ(ÃûÖµ¶Ô·½Ê½)
{src:"http://docs.jquery.com/images/hat.gif",title:"http://docs.jquery.com/images/hat.gif",
alt:"jquery logo"}
)
var alt = $("img").attr("alt");//»ñȡָ¶¨ÔªËØ(×é)µÚÒ»¸öÔªËØµÄaltÊôÐÔÖµ
// alert(alt);
$("img").attr('src','http://www.sinaimg.cn/home/07index/sinahome_ws_009.gif');//Ϊָ֮¶¨ÔªËØ£¨×飩Ìí¼ÓÖ¸¶¨ÊôÐÔ(ÃûÖµ¶Ô·½Ê½)
$("img").attr("title",function(){//Ö¸¶¨ÔªËصÄÊôÐÔÖµÓÃÒ»¸öº¯Êý·µ»ØµÄ½á¹û´úÌæ
return this.src;
})
$("img").removeAttr("title");//ÒÆ³ýÖ¸¶¨ÔªËØÊôÐÔÖµ
$("p:last").addClass("lastp");//addclss Ϊָ¶¨ÔªËØÌí¼Óclass p£ºlast Ϊ×îºóÒ»¸öpÔªËØ
$("p:first").addClass('firstp');
$("p:last").removeClass();//ÒÆ³ýÖ¸¶¨ÔªËØclass
$("p").toggleClass("highlight");//Ϊָ¶¨ÔªËØ
$("p").toggle(function(){//toggle() Ϊָ¶¨ÔªËذ´clickÂÖ»»Ö´ÐÐÁ½¸öº¯Êý
$(this).addClass("hignlight");
},function(){
$(this).removeClass('hignlight')
})
$("p").click(function(){//html()Ϊָ¶¨ÔªËØ×·¼ÓÄÚÈÝ
var html = $("p").text();
$("p").html(html);
})
// $("div").eq(1).addClass("hignlight");//div °´Ë÷ÒýÌí¼ÓÀà
// $("div").text($("img").attr("title"));//Ϊָ¶¨ÔªËرêÇ©ÉèÖÃÄÚÈÝtext£¨£©Ó÷¨
var text = $("div").text();//»ñÈ¡ËùÓÐdiv±êÇ©ÔªËØÄÚÈÝ
var text = $("div.d1").text();//»ñȡָ¶¨classΪd1µÄdiv±êÇ©ÔªËØÄÚÈÝ
//
// $("p > a").hide();//Ò
Ïà¹ØÎĵµ£º
ʹÓÃwap css¿ÉÒÔ°ÑÄÚÈݺͱíʾ·ÖÀ룬ºÃ´¦£º
1.ʹÓÃwcssʹÄÚÈݺÍÑùʽ·ÖÀ룬¿ÉÒÔΪ²»Í¬ÊÖ»ú£¬Éè¼Æ¼¸¸ö°æ±¾wap css style sheet ºÍÖ¸¶¨²»Í¬ÆÁ
Ä»´óС¡£ÄÚÈÝÈ´²»ÐèÒªÐ޸ġ£
2.Ϊ²»Í¬É豸£¬ÈçPC,PDA,MOBILE PHONE£¬×¼±¸²»Í¬Ñùʽ±í£¬ÄÚÈݲ»ÐèÒª¸Ä±ä¡£
3.¼õÉÙά»¤Ò»¸öwapÕ¾µã£¬µ±ÓÐеĵ绰£¬Ö»ÐèÒªÔö¼ÓеÄÑùʽ±í£¬ÄÚÈݲ»ÐèÒ ......
filter:alpha(opacity=50);-moz-opacity:0.5;
Opacity: Ïà¶ÔÓÚIE¡£»ðºüËÆºõºÃÏñ²»Ö§³Ö¡£ Öµ£ºÒÔ°Ù·Ö±ÈΪֵ£¬100 ±íʾ²»Í¸Ã÷¶ÈΪ100%£»50²à´ú±í²»Í¸Ã÷¶ÈΪ50%¡£
-moz-opacity: Ïà¶ÔÓÚFF£¬»ðºü¡£ Öµ£ºÒÔСÊýµãΪֵ£¬1 ±íʾ²»Í¸Ã÷¶ÈΪ100%£»0.5²à´ú±í²»Í¸Ã÷¶ÈΪ50%¡£
×¢Ò⣺ÉÏÃæµÄÂ˾µIE8²»Ö§³Ö¡£Òò´ËÎÒÃÇÐèÒªÓà <meta h ......
cssʵÏÖ±³¾°ÀÉì ÖÆ×÷Ò³ÃæÊ±£¬ÓÐʱÐèÒªÔÚ±í¸ñÄÚ²åÈë±³¾°Í¼,ÎÒÃÇ¿ÉÒÔʹÓÃCSS½øÐпØÖÆ£¬´úÂ룺
style="background-image:url(./images/counter_bg.jpg);background-repeat: no-repeat;background-position: right bottom;"
ÆäÖУ¬./images/counter_bg.jpgΪÏÔʾͼƬ·¾¶¡£ ......
ʵÏÖGridview±íÍ·¹Ì¶¨¿ÉÒÔͨ¹ýCSSÀ´ÊµÏÖ
½«GridView·Å½øÒ»¸öPanelÖУ¬È»ºóÉèÖÃPanel¿ÉÒÔÓÐÊú¹ö¶¯Ìõ(²Î¼ûÎÒµÄÁíһƪΪGridviewÉú³É¹ö¶¯Ìõ)¡£ÉèÖÃGridviewµÄStyleΪ<HeaderStyle CssClass="GridViewHeader" />
.GridViewHeader {
position:relative ;
tabl ......
When you meet trouble with css style in IE7, try this. You can set different css for IE7 and the other browsers.
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/home_c_ie7.css" mce_href="home_c_ie7.css" />
<![endif]-->
......