Saturday, 31 May 2014

using graphics for fancy effect in css3

css psudo element for better design !!

using graphics for fancy effect in css3 with help of css psudo element ':before' and ':after'.
before starting this project check out this preview image to see what we are going to create,






the two graphics tha we are using in this page is below:













now let's get started.
The html file

<body>
<div class="page">
<h1> this is the title</h1>
<p>today we have created a  nice effect using psudo element in css3 .and you know what
that;s look pretty great .want to learn just 8888888888888888888888888
**********************************
****************************
#################################follow the tutorial.you will not regret this</p>

<ul>
<li><a href="#">automating web graphics</a></li>
<li><a href="#">slice tool</a></li>
<li><a href="#">smart object</a></li>
<li><a href="#">layer comps</a></li>
</ul>
</div>
</body>









now the css file

body{
    background-color:#FF6;
    font-family:Arial, Helvetica, sans-serif;
    font-size:16px;
    color:#888;
}
.page{
    width:500px;
    text-wrap:normal;
    background-color:#fff;
    padding:20px 30px 30px 50px;
    margin:30px 200px 30px 30px;
}
.page h1{
    color:#55612d;
    font-size:1.3em;
    font-weight:normal;
    text-transform:uppercase;
    position:relative;
    background-color:#04f431;
    margin:0px -70px 20px -30px;
    padding:18px 0px 16px 30px; 
}
.page h1:after{
    content:'';
    display:block;
    height:40px;
    width:40px;
    background:url(tray.png) no-repeat 0 0;
    position:absolute;
    right:0px;
    bottom:-40px;
}
.page p{
    line-height:1.2em;
}
.page a{
    color:#1badd2;
    text-decoration:none;
}
.page ul {
    margin:0px;
    padding:0px;
}
.page li{
    display:block;
    position:relative;
    padding:2px 0px 8px 25px;
    font-size:15px;
}
.page li:before{
    content:'';
    display:block;
    background:url(Right_arrow.png) no-repeat 0 0;
    height:12px;
    width:30px;
    position:absolute;
    top:5px;
    left:0px;
    background-size:15px 8px;
}




so as you can see how we can use simple graphics to create our page so beautiful.

i hope you enjoy this.
see you next time.






No comments:

Post a Comment