1

I'm using IE 7 . can anyone suggest a simpler code for what I'm trying to do .

here's my html:

    <span id="mainSpan" class="deleteIcon">
        <input type="text" id="txt1" />
        <span id="btn" onclick="var x = document.getElementById('txt1'); x.value = ''; x.focus();"></span>
    </span>

and my css:

        input {
            font-size: 20px;
            width: 250px;
        }
        #mainSpan {
            position: relative;
            border: 1px #aaa inset;
        }
        span.deleteicon span {
            border: none;
            margin-left: 1px;
            position: absolute;
            display: block;
            top: 5px;
            width: 18px;
            height: 18px;
            background: url('file:///path-to-clear.png') no-repeat center;
            cursor: pointer;
        }
        span.deleteicon input {
            border: none;
            margin: 0px;
            padding-right: 0px;
        }

but it looks like this in IE 7:

enter image description here

i want to make it like the spotlight in an iPhone:

enter image description here

and do I need css or javascript if i want the 'clear' button to show up when cursor is in the box ? like this ..

enter image description here

it's easy to do it in other newer browsers but need to use it on IE 7 .

thanks for anyone who can share their code . =D

4

1 回答 1

1

试试ccs3pie

它有助于古老的 IE。您将能够使用边界半径和其他很酷的东西。

于 2013-10-07T02:54:44.783 回答