Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #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

    A repost, since the previous method didn't work with rgba:
    http://www.codingforums.com/showthread.php?t=252043

    Live Website:
    http://testingserver135.pcriot.com/updates/

  • #2
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    bumpp

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,715
    Thanks
    25
    Thanked 660 Times in 659 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>

  • #4
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Thanks for responding sunfighter! <3 I decided to just use an overflow: hidden; approach.

    http://testingserver135.pcriot.com/updates/index2.html

  • #5
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,715
    Thanks
    25
    Thanked 660 Times in 659 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 06:21 AM.

  • Users who have thanked sunfighter for this post:

    Sammy12 (02-23-2012)

  • #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 06:36 AM.

  • #7
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,715
    Thanks
    25
    Thanked 660 Times in 659 Posts
    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.


  •  

    LinkBacks (?)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •