JS大佬帮我看看这两段内容怎么隐藏?
本帖最后由 zoenbo 于 2021-4-19 17:10 编辑页面上有这么两处内容,我想用JS让它隐藏掉,用JS咋实现呢?
<span data-v-1bd09edc="">Power by DAYOKO</span>
<div style="position: fixed; bottom: 2px; left: 0px; right: 0px; text-align: center; font-size: 12px; color: rgb(153, 153, 153); z-index: 1;">
<img style="width: 14px; vertical-align: bottom; margin-right: 5px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAJE0lEQVRYhd2YTWxjVxXHXZXSCkRF1RUCVUhISFBRdcWOFWLFig2iSNAdK4rYoIJYICQQEqxgd+59H36Ov/KcxLHr2HEndhJlkkziZKaux5lM2sQOdjxjx07iPH89+733ZzF5Jh47GWdaNvylu7rvnfN75957zrnP4bihALxARC8pivI65/wHRPRrIvonEamMsTnGWIgxpnDO/8I5f0eSpO/KsvyKqqov3tTXjaSq6otut/tVzvmPGGMuzvkZY8xijJmCIJiSJFmSJOFiWKIoWpxzi4ggSdIu5/yPjLFvR6PRlz93OFmWv8o5f0cQhMyFQ8vn8yGZTCKbzaJQKKBareLs7Aynp6col8s4ODjA1tYWIpEIFEUBYwyc854sy07G2Juqqn7xM4OpqvoiY+xtQRDiRASn02nNz8+jUCjANE2YpolOpwNN01CpVHB0dIRSqYSTkxO0Wi10u10AQKPRwEcffQRVVcE5B+e8pyjK+x6P57XnhotGoy8zxn7BGNMEQbBisRiq1SoAoNlsYnd3F/F4HB6PB0Q0NCRJwvT0NG7fvo2joyPoug7TNJHJZOB2u0FEmJiYuC3L8jdvDCfL8iuMsfeJCC6XC5lMBgCgaRpSqRScTudIqOtGKBRCLpdDr9eDpmmIxWK4sF/inL81NhwRvUREvyciqKqKR48eAQB2d3ehKMqNwZ4e8Xgc9XodALC+vg7GGFwuV5Ux9ua4gO8SESYnJ1GpVNDtdrGysmIvCYLBIKLRKKLRKGZnZ+H1ekeCKIqCqakpRCIRxGIxhEIh+P1+O2ooFosAgM3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gXpdBrT09Pti/frROS80S+3cUREb3DOf8cYS9gRFUWxFQgEKrdu3aqtra21U6mUsbm5aaysrLRjsdiZz+c7u3RADonIOTIJf55SFOV1xthPiOjvjLF5ItpjjJ0/VVsNIioT0TYR+YnoNwO19f9J/wGH7niu+yT3swAAAABJRU5ErkJggg==">
Power by DAYOKO</div> 本帖最后由 jimoguying2020 于 2021-4-19 16:16 编辑
css : style="display:none;"
js:document.getElementById('元素id').style.display = 'none';jq:$('元素id').hide();
可以直接加个样式隐藏#dispaly:none的特点就是会使其子代元素全部隐藏起来,被隐藏的元素不占任何的空间,就连盒模型也也不生成。
.hide {
display:none;
}
#visibility:hidden将元素隐藏了,但是元素所占的空间还是保留的。
.visible {
visibility: hidden;
}
opacity是设置元素的透明度,取值 0~1,0就是全透明,1就是不透明,opacity:0只是在视觉上让人以为元素以及其子代元素被隐藏了,其实该元素还是占据空间的。 jimoguying2020 发表于 2021-4-19 16:15
css : style="display:none;"
js:document.getElementById('元素id').style.display = 'none';jq:$('元 ...
这两段代码是没有设定ID和CLASS的,有的话还好弄一些。 这是vue吗?
直接v-if="false" 被遗忘的路人 发表于 2021-4-19 16:22
这是vue吗?
直接v-if="false"
对的,{:1_921:},就是VUE的,大佬,这个v-if="false"具体怎么操作呢? 轩宸 发表于 2021-4-19 16:19
可以直接加个样式隐藏#dispaly:none的特点就是会使其子代元素全部隐藏起来,被隐藏 ...
这两段代码是VUE生成的,根本找不到,其他元素隐藏的话影响太大了。 如果是页面加载完成后进行隐藏操作,只能找到dom节点进行隐藏。
如果是有源码,直接用v-if="false"把需要隐藏的div包起来就可以了。 看看大佬 麻烦 把这个页面全部贴出来看下