IE7 input:focus

前端 未结 6 844
长情又很酷
长情又很酷 2020-12-09 07:02

I have the following CSS which isn\'t working in IE7.

input:focus{border-width: 2px;border-color: Blue; border-style: solid;}

Basically, I

6条回答
  •  天命终不由人
    2020-12-09 07:31

    A known answer for this problem is using the following code:

        sfFocus = function() {
        var sfEls = document.getElementsByTagName("INPUT");
        for (var i=0; i

    And here is the css style

    input:focus, input.sffocus{background-color:#DEEFFF;}
    

    The problem is that IE doesn't recognise that style at all.

    EDIT: You can find a solution using prototype here: http://codesnippets.joyent.com/posts/show/1837

提交回复
热议问题