【发布时间】:2014-10-13 08:04:21
【问题描述】:
我在buttons.html 中有按钮标签,在images.html 中有图像标签。 当我从buttons.html打开按钮时,我想从images.html隐藏1张图片。 我该怎么做? 这是buttons.html中的按钮
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
<label class="onoffswitch-label" for="myonoffswitch"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label>
<img src="image.jpg" />
</div>
CSS:
#myonoffswitch ~ img
{
display:none;
}
#myonoffswitch:checked ~ img
{
display:block;
}
【问题讨论】:
-
如何在一个页面上加载多个 html 文件?他们是进口的吗?内嵌框架?
-
你可能想看看这个链接stackoverflow.com/questions/13545883/…
-
我需要一个进口源或其他东西,我不知道..
标签: javascript html css image button