rounded corners of input elements in IE

荒凉一梦 提交于 2019-12-07 16:29:23

问题


is there a way to make rounded corners on elements so that they are visible in Internet Explorer.

Currently, I am using curvycorners.js but it only works on block elements...


回答1:


I don't expect it to be possible, as IE uses system controls to render inputs. This caused a lot of errors during last 10 years. If there is such a way - it must be a nasty hack I suppose ;)

But have faith - I can help You with the simplest idea ever!

<div class="corners">
<input type="text" style="border:1px solid #fff" />
</div>

give the div and the input #fff background colours and set input's border to #fff and set div's border to #000 and call the curvycorners on that div. Some padding setting might be needed.

Edit: O, I forgot. For those who don't know. The border on input is important as it overrides using the system default look for inputs so that they are not all that vista-nasty, You know.

It might be bigger than before, but it's done. :)




回答2:


The curvycorners.js is good choice to go with, and as opposed to inline elements, you can apply corners to block level elements only because they can have width and height. And you can make any element block level by setting their style to display:inline-block



来源:https://stackoverflow.com/questions/2654745/rounded-corners-of-input-elements-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!