Make Blurred Background Using CSS

@import "compass/css3";
 
@import url(https://fonts.googleapis.com/css?family=Raleway:100,400,700);
 
$normal-img:"https://lh4.googleusercontent.com/-3eBjuQpOGFw/U47yh_-OycI/AAAAAAAAI2U/uaU5pK49N1w/s1600/normal.jpg";
$blurred-img:"https://lh3.googleusercontent.com/-m8TxQMObg6c/U474EWu7Y9I/AAAAAAAAI2k/xkRGoIEC1iU/s1600/blur.jpg";
 
body{
    background-image:url($normal-img);
    background-repeat:no-repeat;
    background-size: cover;
    background-attachment: fixed;
 
    font-family:Raleway, Open Sans, Droid Sans, Roboto,arial, sans-serif;
}
.blurred-bg{
 
    background-image:url($blurred-img);
    background-repeat:no-repeat;
    @include background-size(cover);
    background-attachment: fixed;
 
    &.tinted{
        @include background-image(linear-gradient(0deg, rgba(255,255,255,.2),rgba(255,255,255,.2)),url($blurred-img));
    }
    &.shaded{
        @include background-image(linear-gradient(0deg, rgba(0,0,0,.2),rgba(0,0,0,.2)),url($blurred-img));
    }
}
.box{
    width:500px;
    height:300px;
  left:-webkit-calc( 50% - 250px );
  top:20%;
    position:absolute;
    border-radius:5px;
    @include box-shadow(0 20px 30px rgba(0,0,0,.6));
    border:1px solid rgba(255,255,255,.3);
    padding:20px;
    text-align: center;
    @include box-sizing(border-box);
    text-shadow:0 1px 1px rgba(0,0,0,.4);
  display: flex;
  transition: box-shadow .3s ease;
 
    &:active{
    cursor:move;
    @include box-shadow(0 20px 50px rgba(0,0,0,.9));
  }
 
  .content{
    margin: auto;
  }
}
h1,h2,a,p{
    color:white;
    font-weight:100;
 
    .tinted &{
        color:black;
        text-shadow:0 1px 1px rgba(255,255,255,.2);
    }
}
h2{ font-size: 14px }
p{ 
  margin: 20px;
  &.related{
    text-transform: uppercase;
    font-weight: 700;
    color: #444;
 
    a{
      font-weight: 700;
      text-decoration: none;
      &:hover{
        text-decoration: underline;
      }
    }
  }
}
 
.iklan{
  position: fixed;
  bottom: 0;
  right: 0;
  background: white;
  width: 200px;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 
  p{
    margin: 0 0 15px;
    line-height: 1.4;
    color: #333;
  }
 
  a{
    background-color: #ff4757;
    color: white;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Top