兼容所有浏览器的圆角矩形效果代码实例_html/css_WEB-ITnose
兼容所有浏览器的圆角矩形效果代码实例:
CSS3中已经给出了非常方便定义圆角的属性,可惜IE浏览器中兼容性很差,这里就不多介绍了,具体可以参阅CSS3实现圆角效果一章节。由于兼容性问题所以要使用一些特别的方法来实现圆角效果,下面就是一段这样的代码实例。
代码如下:
<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>div+CSS圆角矩形</title><style type="text/CSS">body{ padding:20px; background-color:#FFF; font:100.01% "Trebuchet MS",Verdana, Arial,sans-serif}div#nifty{ margin:0 10%; background:#9BD1FA}p{padding:10px}div.rtop, div.rbottom{ display:block; background:#FFF}div.rtop div, div.rbottom div{ display:block; height:1px; overflow:hidden; background:#9BD1FA}div.r1{margin: 0 5px}div.r2{margin: 0 3px}div.r3{margin: 0 2px}div.rtop div.r4, div.rbottom div.r4{ margin:0 1px; height:2px}</style></head><body><div id="nifty"> <div class="rtop"> <div class="r1"></div> <div class="r2"></div> <div class="r3"></div> <div class="r4"></div> </div> <p>蚂蚁部落欢迎您!</p> <div class="rtop"> <div class="r4"></div> <div class="r3"></div> <div class="r2"></div> <div class="r1"></div> </div></div></body></hmtl>
以上代码虽然较为麻烦一些,但是能够实现圆角效果,还是挺不错的。
原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=9521
更多内容可以参阅:http://www.softwhy.com/divcss/

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit
