简体   繁体   English

如何将显示无属性添加到Img标签

[英]How to add Display None property to Img tag

Hi i need to add display none to img tag .... 嗨,我需要显示无添加到img标签...。

what i have tried so far... 到目前为止我尝试过的...

 $('.droppedFields .droppedField').children('img').attr('style', 'display:none');

but it is not working! 但它不起作用! Any help 任何帮助

<div class="span5 well droppedFields ui-droppable ui-sortable">
    <div class="draggableField ui-draggable droppedField" id="CTRL-DIV-1001">
        <img src="CntrlImages/form-title-icon.gif">
        <input type="text" placeholder="Form Title" id="Header-text" class="ctrl-emailbox headerText" disabled="" style="background-color: rgb(255, 255, 255);">
    </div>
</div>

add this css to img tag 将此CSS添加到img标签

  .draggableField img {
    display:none;
    }

请尝试以下方法:

$('.droppedFields .droppedField').children('img').css("display","none");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM