简体   繁体   中英

How to remove the border around an image in HTML file

Can someone help me to remove the border of this "Plus" image?

<div id="Drop Image and Advance Search" style="margin-left: 0px">
    <img id='downarrow' style='float: left;'
        border=none src=".\images\button_plus.gif"
        width="20" height="20"
        onclick="javascript:toggle();"> 
    <img id='uparrow'
        style='display: none; float: left;'
        border=none src=".\images\button_minus.gif"
        width="20" height="20"
        onclick="javascript:toggle();"> 
    <a href="javascript:toggle();"> <u><h4>Advance Search</h4></u></a>
</div>

You should use border="0" instead of border=none

Or better yet, since the border attribute is deprecated as of HTML 4.01 (source MDN ), add a style

<img style="border:0" />

尝试:

<img border="0" src=".\images\button_minus.gif" width="20" height="20">

Use css like

img {
    border: 0 none;
}

Need to use style="border:0"

 <div id="Drop Image and Advance Search" style="margin-left: 0px">

        <img id='downarrow' style='float: left; border:0px;'
            src=".\images\button_plus.gif"
            width="20" height="20"
            onclick="javascript:toggle();"> 
        <img id='uparrow'
            style='display: none; float: left; border:0px;'
             src=".\images\button_minus.gif"
            width="20" height="20"
            onclick="javascript:toggle();"> 
            <a href="javascript:toggle();"> <u><h4>Advance Search</h4></u></a>
    </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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