Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Ribbon Banner using pure CSS.

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 430
    Comment on it

    Hello Readers!
    Here in this blog I am gonna to explain you about the Ribbon banner using pure CSS. As Images are used in web pages to make them look more interactive and appealing but it takes little time of user while image is loading in the background. So getting rid from this issue we have created banner using pure CSS.

    Here is simple line of code used for making the banner. We take only three div for making the banner and the text is written in the span, user can use style for making it more stylish by adding different colors and effects to it.

    <!DOCTYPE HTML>
    <html>
    <head>
    <style>
    @import url(http://fonts.googleapis.com/css?family=Oswald:400);
    
    body {
      background: #444;
        font-size: 1em;
        font-family: 'Oswald', 'Helvetica Neue', Helvetica;
        line-height: 1.4;
    }
    
    .banner {
        position: relative;
        z-index: 1;
        margin: 80px auto;
        width: 330px;
    }
    
    .banner .line {
        margin: 0 0 10px;
        width: 100%;
        height: 78px;
        box-shadow: 10px 10px 10px rgba(0,0,0,0.05);
        text-align: center;
        text-transform: uppercase;
        font-size: 3em;
        line-height: 78px;
        transform: skew(0, -15deg);
    }
    
    .banner .line:after,
    .banner .line:first-child:before {
        position: absolute;
        top: 44px;
        left: 0;
        z-index: -1;
        display: block;
        width: 330px;
        height: 78px;
        border-radius: 4px;
        background: rgba(180,180,180,0.8);
        content: '';
        transform: skew(0, 15deg);
    }
    
    .banner .line:first-child:before {
        top: -10px;
        right: 0;
        left: auto;
    }
    
    .banner .line:first-child:before,
    .banner .line:last-child:after {
        width: 0;
        height: 0;
        border-width: 38px;
        border-style: solid;
        border-color: rgba(180,180,180,0.8) rgba(180,180,180,0.8) transparent transparent;
        background: transparent;
    }
    
    .banner .line:last-child:after {
        top: 12px;
        border-color: transparent transparent rgba(180,180,180,0.8) rgba(180,180,180,0.8);
    }
    
    .banner span {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 4px;
        background: rgba(255,255,255,0.9);
        color: #666;
        text-shadow: 1px 1px 0 #444;
    }
    </style>
    
    </head>
    <body>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Pure CSS3 Loading</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
    <div class="banner">
      <div class="line">
        <span>Fancy Banners</span>
      </div>
      <div class="line">
        <span>Make It Look</span>
      </div>
      <div class="line">
        <span>Nice &amp; Classy</span>
      </div>
    </div>
    </body>
    </html>
    </body>
    </html>

    Note:- Just do copy the above code into your text editor, you will get the Result

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: