CSS圆角桌角,渐变背景
Here's me fiddle:
I want to work some CSS magic on the table header:
- Rounded corners in upper left and upper right
- Gradient color background
- Gradient border
- Cross-browser compatibility
How can this all be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
渐变:
大多数现代浏览器都使用 CSS3 实现了这些功能,但对于 Internet Explorer,您必须使用特殊的过滤器。由于 CSS3 是一个新兴标准,因此您必须使用特定于浏览器的前缀。
可能还有第三种方法
请记住,您始终可以使用背景上带有重复 x 的图像。
圆角:
在大多数现代浏览器中,圆角都被 border-radius 覆盖:
对于旧版本的 Internet Explorer,您将不幸地不得不做更多黑客的事情,这些事情可能真的不值得花费时间和精力。 http://webdesign.about.com/od/css/a/aa072406.htm 是我发现扫描网页速度非常快的一个例子。
对于更多内容,根据我的经验,MDC 通常可以很好地解释浏览器功能及其兼容性以及其他浏览器的替代方案。
Gradients:
Most modern browsers have implemented these using CSS3 but for Internet Explorer you'll have to use special filters. Since CSS3 is an emerging standard, you have to use browser specific prefixes.
there may be a third approach
keep in mind that you could always use an image with a repeat-x on the background.
Rounded Corners:
Rounded corners are covered by border-radius in most of your modern browsers:
For older versions of Internet Explorer, you'll unfortunately have to do more hackerly things that are probably not worth the time and effort really. http://webdesign.about.com/od/css/a/aa072406.htm is an example I found scanning the web really quickly.
For more stuff, the MDC is usually pretty good in my experience about explaining browser features and their compatibility and alternatives for the other browsers.