box shadow on an ipad / safari

2019-03-18 09:39发布

I'm having trouble adding the nice shadow on focus for an input box on my ipad for safari.

Here's my code

/* remember to define focus styles! */
:focus {
    outline: 0;
}    
input[type=text]{
        width: 494px;

        height: 44px;
        line-height: 44px;
        font-size: 24px;
        border: 2px solid #666666;
    }
    input:focus{
      -webkit-box-shadow:0 0 15px #ffffff;
       -moz-box-shadow: 0 0 15px #ffffff;
       box-shadow:0 0 15px #ffffff;
    }

I'm using eric meyer's reset. I want it to look like this: alt text

Any ideas?

Thanks guys.

Jason

3条回答
在下西门庆
2楼-- · 2019-03-18 10:14
<input type="text" name="success" value="fail">

No dice people, ipad hasn't got support for this which is so useless, chrome is it!

Update:

-webkit-appearance: none; FTW

查看更多
劫难
3楼-- · 2019-03-18 10:25

In my case, setting border-radius solved my problem.

border-radius: 1px;
查看更多
Anthone
4楼-- · 2019-03-18 10:30

I have the same problem but I found the solution:

-webkit-appearance: none;

However it does not work when there is an inset shadow.

查看更多
登录 后发表回答