Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



<div id="container" class="angled-top-left">
    <div class="content">
        <h1>لبه های زاویه دار</h1>
        <p>در اینجا نسخه نمایشی برای استفاده از لبه های زاویه دار را میبینید که با انتخاب هر جهت چگونگی تغییر شکل آن را میبینید</p>
        <select id="selectStyle" onchange="changeStyle()">
            <option value="angled-top-left">لبه بالا سمت چپ</option>
            <option value="angled-top-right">لبه بالا سمت راست</option>
            <option value="angled-bottom-left">لبه پایین سمت چپ</option>
            <option value="angled-bottom-right">لبه پایین سمت راست</option>
            <option value="angled-both-left">لبه هر دو سمت چپ</option>
            <option value="angled-both-right">لبه هر دو سمت راست </option>
            <option value="angled-both-left-right">لبه چپ به راست</option>
            <option value="angled-both-right-left">لبه راست به چپ</option>



                $color1: #011627; //rgba(1, 22, 39, 100)
$color2: #fdfffc; //rgba(253, 255, 252, 100)
$color3: #2ec4b6; //rgba(46, 196, 182, 100)
$color4: #e71d36; //rgba(231, 29, 54, 100)
$color5: #ff9f1c; //rgba(255, 159, 28, 100)

    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #555;

  margin-top: 100px;
    height: 400px;
    width: 100%;
    position: relative;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(#fff, 0.9);
    border-radius: 8px;
    width: 25%;
    padding: 40px;
    text-align: center;
    -webkit-box-shadow: 0 0 8px 0 rgba(0,0,0, 0.12);
    box-shadow: 0 0 8px 0 rgba(0,0,0, 0.12);
        font-family: Georgia, serif;
        font-size: 40px;
        font-weight: normal;
    margin-top: 20px;

@mixin angle-edge($pos-top:null, $angle-top:null, $pos-btm:null, $angle-btm:null){
    width: 100%;
    position: relative;
    background: linear-gradient(to right, rgba(241,231,103,1) 0%, rgba(254,182,69,1) 100%);
        content: '';
        width: 100%;
        height: 100%;
        position: absolute;
        background: inherit;
        z-index: -1;
        transition: ease all .5s;

    @if $pos-top{
            @if $pos-top == 'topleft'{
                top: 0;
                transform-origin: right top;
                transform: skewY($angle-top);
            @if $pos-top == 'topright' {
                top: 0;
                transform-origin: left top;
                transform: skewY(-$angle-top);

    @if $pos-btm{
            @if $pos-btm == 'bottomleft' {
                bottom: 0;
                transform-origin: right bottom;
                transform: skewY(-$angle-btm);

            @if $pos-btm == 'bottomright' {
                bottom: 0;
                transform-origin: left bottom;
                transform: skewY($angle-btm);


    @include angle-edge($pos-top: topleft, $angle-top: 3deg);

    @include angle-edge($pos-top: topright, $angle-top: 3deg);

    @include angle-edge($pos-btm: bottomleft, $angle-btm: 3deg);

    @include angle-edge($pos-btm: bottomright, $angle-btm: 3deg);

    @include angle-edge(topleft, 3deg, bottomleft, 3deg);
    @include angle-edge(topright, 3deg, bottomright, 3deg);
    @include angle-edge(topleft, 3deg, bottomright, 3deg);
    @include angle-edge(topright, 3deg, bottomleft, 3deg);


                function changeStyle() {
    var x = document.getElementById("selectStyle").value;
    document.getElementById("container").className = "" + x;