我的頁面構建器中有以下 html。我想洗掉 z-index。
<div class="thrv_wrapper thrv-page-section tve-height-update tcb-mp" data-css="tve-u-17f1c45d6a7" id="mcards" style="z-index: 14 !important;">
嘗試了以下 3 個選項但不起作用:
document.getElementById("mcards").removeAttribute("style");
$("#mcards").css({"z-index": "1!important"});
$('#mcards').removeAttr('style');
uj5u.com熱心網友回復:
你的代碼應該是這樣的,
$(document).ready(function(){
//$("#mcards").css({"z-index": "unset"});
$('#mcards').removeAttr("style");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="thrv_wrapper thrv-page-section tve-height-update tcb-mp" data-css="tve-u-17f1c45d6a7" id="mcards" style="z-index: 14 !important;">test</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/535633.html
