Enjoy an ad free experience by logging in. Not a member yet?
Register .
02-21-2012, 10:49 PM
PM User |
#1
Registered User
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
CSS Transform Skew One Side with RGBA
02-22-2012, 08:30 PM
PM User |
#2
Registered User
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
bumpp
02-22-2012, 09:49 PM
PM User |
#3
Senior Coder
Join Date: Jan 2011
Location: Missouri
Posts: 2,399
Thanks: 18
Thanked 352 Times in 351 Posts
Not the answer, but something to play with:
Code:
<style type="text/css">
#test
{
font-size: 0px; line-height: 0%; width: 100px;
border-bottom: 20px solid rgba( 205, 92, 92, .7);
border-left: 20px solid rgba(255, 255, 255, .0);
}
</style>
</head>
<body style="background-image: url('http://testingserver135.pcriot.com/updates/images/user/default/background.jpg')">
<div id="test">
</div>
</body>
</html>
02-23-2012, 04:57 AM
PM User |
#5
Senior Coder
Join Date: Jan 2011
Location: Missouri
Posts: 2,399
Thanks: 18
Thanked 352 Times in 351 Posts
Sammy I just love what your are trying to do. I think I got it.
Code:
<!DOCTYPE html>
<html id=" " class="adamant compatible script window" lang="en" dir="ltr">
<head>
<title></title>
<style type="text/css">
.para
{
width: 11px;
height: 30px;
-webkit-transform: skew(315deg);
-moz-transform: skew(315deg);
-ms-transform: skew(315deg);
-o-transform: skew(315deg);
transform: skew(315deg);
}
#test
{
font-size: 0px; line-height: 0%; width: 530px;
border-bottom: 30px solid rgba(0, 0, 0, .5);
border-left: 30px solid rgba(255, 255, 255, .0);
}
</style>
</head>
<body style="background-image: url('http://testingserver135.pcriot.com/updates/images/user/default/background.jpg');background-position: center top;">
<div class="para" style="background-color:rgba(0, 0, 0, .65);position:absolute;left:240px;top:70px;"></div>
<div class="para" style="background-color:rgba(0, 0, 0, .65);position:absolute;left:257px;top:70px;"></div>
<div id="test" style="position:absolute;left:259px;top:70px;">
</div>
</body>
</html>
Last edited by sunfighter; 02-23-2012 at 05:21 AM ..
Users who have thanked sunfighter for this post:
02-23-2012, 05:33 AM
PM User |
#6
Registered User
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
That was quite impressive, definitely more efficient than mine
but I needed to have borders
and box-shadow chokes the skew, and if a browser doesn't support css transform, the .paras are not going to be skewed, but the #test will be.
http://testingserver135.pcriot.com/updates/index2.html
I'm so surprised that there isn't an easy way to skew one side! How could they have not thought of this?
Last edited by Sammy12; 02-23-2012 at 05:36 AM ..
02-23-2012, 03:06 PM
PM User |
#7
Senior Coder
Join Date: Jan 2011
Location: Missouri
Posts: 2,399
Thanks: 18
Thanked 352 Times in 351 Posts
Quote:
I'm so surprised that there isn't an easy way to skew one side! How could they have not thought of this?
There is. I once had a link to a page that helped you do just that, put your value into a box, show you the result and gave you the code, but I could not find it.
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 07:42 AM .
Advertisement
Log in to turn off these ads.