Jump to content

Recommended Posts

Hello,

 

I am working on a layout that includes a glass effect and border radius.

 

The effects work in all browsers except internet explorer. The code below is of a transparent glass box on an orange background but you just see a frame with no round corners in IE.

 

The extra css code with 'rgba' colors is just additional background colors which are supposed to be controlled by a javascript function to display random backgrounds but that isn't necessary as I need just one background color.

 

Could you please make my code compatible with IE so that it produces the same effect just like in firefox and opera.

 

<html>
<head>
<style type="text/css">
body
{
background-color:orange;
}
#area
{
   position:absolute;
   z-index:2;
   width: 300px;
   height: 300px;
   margin: 0 0 0 0;
   padding: 0;
   border: 1px solid rgba(0,0,0,0.5);
   border-radius: 10px 10px 10px 10px;
   background: rgba(0,0,0,0.25);
   box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
   -o-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
   -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
   -moz-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
}
</style>
</head>
<body>

<div id="area">
    <p>  This is a Glass box with round corners.
</div>
</body>
</html>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/255879-ie-glass-effect/
Share on other sites

Could you please make my code compatible with IE so that it produces the same effect just like in firefox and opera.

That is going to be difficult because IE's support for inset and rgba is poor. If I'm informed correctly, both are not supported in IE<9, rgba maybe even not in IE<10.

Link to comment
https://forums.phpfreaks.com/topic/255879-ie-glass-effect/#findComment-1311729
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.