IE 中输入元素的圆角
有没有办法在元素上制作圆角,以便它们在 Internet Explorer 中可见。
目前,我正在使用 curvycorners.js 但它只适用于块元素......
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不认为这是可能的,因为 IE 使用系统控件来呈现输入。这在过去 10 年中造成了很多错误。如果有这样的方法 - 我想这一定是一个令人讨厌的黑客;)
但是要有信心 - 我可以用最简单的想法来帮助你!
给div和输入#fff背景颜色,并将输入的边框设置为#fff,将div的边框设置为#000,并在该div上调用curvycorners。可能需要一些填充设置。
编辑:哦,我忘了。对于那些不知道的人。输入的边框很重要,因为它会覆盖使用系统默认的输入外观,这样它们就不会那么糟糕,你知道。
它可能比以前更大,但已经完成了。 :)
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!
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. :)
curvycorners.js 是一个不错的选择,与内联元素相反,您只能将角应用于块级元素,因为它们可以具有宽度和高度。您可以通过将样式设置为
display:inline-block
来使任何元素成为块级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