怎样通过css点击图片关闭按钮就把图片给关闭了

html-css05

怎样通过css点击图片关闭按钮就把图片给关闭了,第1张

<style type="text/css">

.box {

position: relative

display: inline-block

}

.box .clear {

position: absolute

top: 0

right: 0

width: 16px

height: 16px

border: 1px solid #999

}

</style>

<div class="box">

<img src="images/testing.jpg" width="300" height="300" alt="" />

<div class="clear" onclick="this.parentNode.style.display='none'">X</div>

</div>

现在给您打上隐藏*首页*的语法 先将背景设为纯白色

然后隐藏首页所有*可隐藏*的组件 ps-请把网志清单设为标题模式 语法 ------ #blog_masshead{height:100pxfont-size:0pxfont-weight:boldcolor:#FFFbackground:trparent} #blog_masshead .rc

#blog_masshead .rc div

#blog_masshead .rc_bd

#blog_masshead .rc_bc

#blog_masshead .rc_ft

#blog_masshead .rc_ft div

#blog_masshead .bd

#blog_masshead .menu .rc_w

#blog_masshead .menu .rc_e{height:30pxbackground:trparent} #blog_masshead .bd ul{list-style:none} #blog_masshead .menu a{height:31px} #blog_masshead .menu.ml a

#blog_masshead .menu.mr a{background:trparent} #blog_masshead .bd form input.ipt

#blog_masshead .bd form .btn{height:0pxborder-width:0pxbackground:trparent} #profile_highlight .bd{height:0px} .mod-alist-searchbox input.ipt{height:0pxbackground:trparentborder-top:0pxborder-left:0pxborder-right:0pxborder-bottom-width:0px} .mod-alist-searchbox input.btn{background:trparentfont-size:0pxcolor:#FFFborder-top:0pxborder-left:0pxborder-right:0pxborder-bottom-width:0px} .mod-alist-brief table th{background:trparentfont-size:0%font-color:#FFFborder-width:0px} .mod-alist-full .pagination

.mod-alist-brief .pagination

.mod-alist-pagination a{background:trparent} .col-600 .rc_bd .rc_bc .bd

.col-600 .rc_bd .rc_bc .ft{background:trparentfont-size:0%} #blast .rc_ft

#blast .rc_bc .bd

#blast .rc_bc .bd a

#blast .rc_bc .bd a:hover{background:trparentfont-size:0%font-color:#FFF} .rc div

.rc_ft div

.rc_bd div.rc_bc

.rc_bd

.rc

.rc_ft

#blast .rc_ft

#blast .rc_ft div{background:none} ------ 另外隐藏广告语法(管理员发现了可能会封BLOG): #ov H2

#ov li a

#ov li{font:0%color:#FFF} #ov .ov_spns h2 a

#ov .ov_spns h2 a:hove{color:#FFFborder-width:0pxbackground:none} #ov_side_ctnr #ov ul{font-size:0%background:trparentborder-width:0px} {width:0%color:#FFF} ------ (如有任何错漏可到我BLOG留言通知或在知识send email给我) 2009-01-16 05:21:05 补充: 「隐藏首页所有*可隐藏*的组件」<<----我是指

在编辑版面模式中删除组件

另外不能隐藏的档案组件和网志组件用语法便可以隐藏 2009-01-16 05:22:23 补充: 以上语法均由我研究

转载请确实列明出处

thanks* 2009-01-16 05:24:01 补充: 很抱歉因字数限制

广告语法以外所有语法也未能详尽解释

祈谅 2009-01-18 07:55:53 补充: elishali2那个是奇摩BLOG的语法

中国香港的还没正式出.. 这条问题也是我第一次答... 其实我很想解释&教其他页消除的语法

可惜时间和字数关系.. 所以....

参考: .myblog.yahoo/Cat-Goddess

/*Opacity for blast隐藏整个部落格语法*/ #yblast .bg {zoom:1filter:alpha(opacity:80)background: url(.yimg/iblog/yimg/blast_bg1) no-repeat} #ymodprf {display:none} #usrinfo {display:none} #yblast {display:none} #yleavemsg {display:none} #ymsgboard {display:none} #ymodalbum

#yphtgallery {display:none} #ymodupdate {display:none} #yh_masthead

#yh_mastfoot {display:none} #ybloginfo

#yusrintro {display:none } #btn *** srb_nologin {display:none} #yartcmt {display:none} .ycmntreply {display:none} #rtemodule {display:none} #yarticle

#y *** scrblist {display:none } #yblogtitle { position:absolutetop:220pxwidth:510pxheight:125px } #yblogtitle h1 {color:00b0ffleft:16px} #yblogtitle a {text-decoration: none} #yblogtitle .rctop

#yblogtitle .rctop div

#yblogtitle .rcbtm

#yblogtitle .rcbtm div

#yblogtitle .rcl

#yblogtitle .rcr { zoom:1filter:alpha(opacity:75) } .tft #btn *** srb { display:none } #yusrinfo { display:none } 不知道是不是!

参考: My Blog.myblog.yahoo/Dream-World

栗如窗口最外层class名为 closed 则这么写 $(document).ready(function(){ $('.closed').click(function(){$(this).hide()})})记得头部引入 jQuery库