开发者

Easiest way to add a CSS border, dropshadow, and rounded corners for my content

OK, I have my site going pretty well here: http://www.marioplanet.com

But I've realized that if the end-user's monitor is big enough to display the animation on the sides of the pages (which mostly every desktop's monitor and some laptop's can) than I believe my main content would look better with a little red / black border, and some rounded corners, and perhaps even a dropshadow.

Now, I am looking for the easiest way to implement both the border and the rounded corners, and hopefully the dropshadow, but that's not as necessary, with the smallest amount of code.

If I can make it work with just CSS for most browsers except for IE and fallback to a jQuery / JS plugin for IE, that's great too. Or even leave it out of IE completely, but that's not too nice! :)

UPDATE:

OK, I can get it to apply to my header <div> as you can see live right now, but when I try to apply it to the overall wrappter <div>, I get nothing. It may be because I need to have the width and height开发者_Python百科 properties specified in my CSS first.

Thanks!

UPDATE UPDATE:

I found the easiest way to do the borders was by using the following CSS3 selectors:

border-top-left-radius: 50px;
border-top-right-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;

Which all work like a charm!!


CSS3 can do all that you need, and most browsers support it except IE8. (The next version of Internet Explorer will support these features though.)

Visit css3.info for more information.


UPDATE

I've started using http://css3please.com/ recently. It's equally great!


Check this out: http://css3pie.com/

PIE makes Internet Explorer 6-8 capable of rendering several of the most useful CSS3 decoration features.

It is easy to use and integrate, it allows you to use CSS3 features like border-radius, shadow, gradient backgrounds, etc... and best of all... it is compatible with IE!

I hope this helps!


jquery corner plugin is the best plugin to create a rounded corner, and Dropshadow is good one drop shadow effect. Its literally tow lines of code(ignoring the plugin code) :)


http://www.cssplay.co.uk/boxes/four_cornered.html

http://www.cssplay.co.uk/boxes/ has the rounded corners, dropshadow and more. 100% CSS with no use of JS, and works in IE.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜