CSS3 skew only top right corner

vladja

I'm trying to make a website where sections are transformed with css3 transform: skewY(-4deg). On the last element I got a problem, if I skew element I have a white space on the bottom. Please, give some advices to fix it. Tried this but it doesn't work enter image description here

HTML:

<section id="connect-us">

        <div class="content-wrapper">
            <h1>Подключиться очень просто!</h1>
            <p>Укажите вашу почту и наш менеджер свяжется с вами в течении дня,а на следующий день ваше заведение будет подключено!</p>

            <form action="#">
                <input type="text" name="email" placeholder="Ваша почта">
                <button class="button button--dark-red" type="submit">Отправить</button>
            </form>

            <div class="social-belt">
                <a href="#" class="icon-facebook-with-circle"></a>
                <a href="#" class="icon-twitter-with-circle"></a>
                <a href="#" class="icon-linkedin-with-circle"></a>
            </div>

            <footer>
                <div class="copyright">
                    <span><span class="firm-name">Mimicra 2015&trade;</span> Сделано в <a href="http://cpdbbk.com">cpdbbk.com</a></span>
                </div>
            </footer>
        </div>
    </section>
</div>

SASS:

#connect-us
    padding: 80px 0
    background-color: $darkviolet2
    text-align: center
    position: relative
    width: 100%
    transform: skewY(-4deg)

.content-wrapper
  +transform(skew(0deg, 4deg))
Timon

Based on your HTML code, you could do it like this:

CSS

#connect-us {
    padding: 80px 0;
    background-color: blue;
    text-align: center;
    position: relative;
    width: 100%;
    overflow:hidden;
    z-index: 1;
}

#connect-us:after {
    width: 100%;
    content: "";
    display: block;
    height: 100%;
    position: absolute;
    top: 10%;
    -webkit-transform: skewY(-4deg);
    -moz-transform: skewY(-4deg);
    -ms-transform: skewY(-4deg);
    -o-transform: skewY(-4deg);
    transform: skewY(-4deg);
    background-color: red;
    z-index: 2;
}

.content-wrapper {
    position: relative;
    z-index: 3;
}

Here's a jsFiddle, showing how it looks:

http://jsfiddle.net/3kauL03j/3/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

CSS background-position top right corner

From Dev

half borders at top right corner and bottom left corner with css

From Dev

Skew only right side of element

From Dev

Fabric Js: How to Create Rectangle programatically with only 2 points that is Top Left Corner and Bottom Right Corner?

From Dev

Why is corner radius applied only to top left and right corner for a custom view?

From Dev

Showing a dialog on top right corner

From Dev

display icons with black overlay on top right corner of image css

From Dev

css: how to position a X sign at the top right corner of the img element

From Dev

Moving an div from the top left corner to bottom right using css

From Dev

CSS : Float a number value on the right top corner of an image

From Dev

CSS move new fields to top right hand corner

From Java

How to set cornerRadius for only top-left and top-right corner of a UIView?

From Dev

Position fixed element in bottom right corner of page with CSS3

From Dev

Round only top corner of cardview

From Dev

how to set cornerRadius for only bottom-left,bottom-right and top-left corner of a UIView?

From Java

how to set cornerRadius for only bottom-left,bottom-right and top-left corner textview?

From Dev

Android: putting an icon in the top right corner of a collapsingToolbarLayout?

From Dev

Position icon at the top right corner of a fieldset with legend

From Dev

Drawing a label on canvas top right corner

From Dev

YTPlayerView: Remove Share Button in top right corner

From Dev

Border Layout Positioning on bottom right (but not top) corner

From Dev

HTML - placing the audio object in top right corner

From Dev

Slack icon not visible in top right corner in ubuntu

From Dev

Set a close icon in the top right corner of an image

From Dev

Top right corner triangle inside a input field

From Dev

Skew one corner of image

From Dev

Skew one corner of image

From Dev

How to display legend in bottom right corner instead of top right?

From Dev

Align number over image to top right corner or on the top of image

Related Related

  1. 1

    CSS background-position top right corner

  2. 2

    half borders at top right corner and bottom left corner with css

  3. 3

    Skew only right side of element

  4. 4

    Fabric Js: How to Create Rectangle programatically with only 2 points that is Top Left Corner and Bottom Right Corner?

  5. 5

    Why is corner radius applied only to top left and right corner for a custom view?

  6. 6

    Showing a dialog on top right corner

  7. 7

    display icons with black overlay on top right corner of image css

  8. 8

    css: how to position a X sign at the top right corner of the img element

  9. 9

    Moving an div from the top left corner to bottom right using css

  10. 10

    CSS : Float a number value on the right top corner of an image

  11. 11

    CSS move new fields to top right hand corner

  12. 12

    How to set cornerRadius for only top-left and top-right corner of a UIView?

  13. 13

    Position fixed element in bottom right corner of page with CSS3

  14. 14

    Round only top corner of cardview

  15. 15

    how to set cornerRadius for only bottom-left,bottom-right and top-left corner of a UIView?

  16. 16

    how to set cornerRadius for only bottom-left,bottom-right and top-left corner textview?

  17. 17

    Android: putting an icon in the top right corner of a collapsingToolbarLayout?

  18. 18

    Position icon at the top right corner of a fieldset with legend

  19. 19

    Drawing a label on canvas top right corner

  20. 20

    YTPlayerView: Remove Share Button in top right corner

  21. 21

    Border Layout Positioning on bottom right (but not top) corner

  22. 22

    HTML - placing the audio object in top right corner

  23. 23

    Slack icon not visible in top right corner in ubuntu

  24. 24

    Set a close icon in the top right corner of an image

  25. 25

    Top right corner triangle inside a input field

  26. 26

    Skew one corner of image

  27. 27

    Skew one corner of image

  28. 28

    How to display legend in bottom right corner instead of top right?

  29. 29

    Align number over image to top right corner or on the top of image

HotTag

Archive