Showing posts sorted by relevance for query code snippets. Sort by date Show all posts


Smooth toggle button which works just like IOS

Here's the code Snippet:



<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>Toggle Button by roundCube</title>
<style>
#container{
position:absolute;
top:0%;
left:0%;
width:100%;
height:100%;
background-color:black;
  -webkit-transition:all 0.5s ease;
  -moz-transition:all 0.5s ease 0s;


}

#toggleButtonBody{
position:absolute;
top:2%;
left:2%;
width:50px;
height:25px;
background-color:#e05d53;
border-radius:35px;
z-index=0;

}

#toggleSwitch{
position:absolute;
top:1%;
left:1%;
width:50%;
height:98%;
background-color:white;
cursor:pointer;
cursor:hand;
z-index=0;
  -webkit-transition:all 0.5s ease;
  -moz-transition:all 0.5s ease 0s;
  border-radius:35px;



}


</style>

<script>
function onOffSwitch(){

 var toggle = document.getElementById("toggleButtonBody");
 var container = document.getElementById("container");
 var toggleSwitch = document.getElementById("toggleSwitch");


 if(toggle.style.zIndex!=1)//switch the button on
 {

toggle.style.backgroundColor="#77ce6d";
toggleSwitch.style.left="48%";
toggle.style.zIndex=1;

container.style.backgroundColor="white";//task to perform when button is switched on

 }
 else{//switch the button off

 toggle.style.backgroundColor="#e05d53";
 toggleSwitch.style.left="0%";
 toggle.style.zIndex=0;

 container.style.backgroundColor="black";//task to perform when button is switched off
 }



}

</script>

  </head>

  <body>
  <div id="container">
<div id="toggleButtonBody">
<div id="toggleSwitch" onclick="onOffSwitch()")></div>
</div>

  </div>


  </body>

  </head>




lets look at the JavaScript to understand what's actually happening here

so we initially specified the z-index of  toggleButtonBody as 0

the first condition involved in the JavaScript states that toggle.style.zIndex!=1 which means that the parts of this condition would be executed only when this condition is true
when we execute the code this condition would be considered true,so when we click the button the background color of the toggle button would change via this toggle.style.backgroundColor="#77ce6d";
and also it would slide the circular part to left via
toggleSwitch.style.left="48%";

and after these two statements we used another statement
toggle.style.zIndex=1;

why did we use that? you would understand that in the later part of this article

okay so when the button is clicked we ofcourse need to it to perform some task in my case i used it to changed the background color of my main container using this command
 container.style.backgroundColor="white";

okay so we are done with the first part of the code which would occur when the button is initially off and we click it to make it on and it would change the background color to black,but what if my button is at the on state and i click it then we need a code for that too,that's when the else part of the code comes in use

so when does this else part comes into use?Of course when the first condition is not true, so when the button is at the on state its z-index would be 1 which would result int the first condition being declared false and that's when the second part of our code would be executed
this part of the code will make sure that the button changes it color back to that of off state
toggle.style.backgroundColor="#e05d53";

and move the circular to the left
toggleSwitch.style.left="0%";

and change the z-index back to 0 so that it can be toggled again
toggle.style.zIndex=0;

and the background color changes back to black via this statement
container.style.backgroundColor="black";


That's all :)





If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page




Looking at various websites out there we stumble upon parts of the web which are semi transparent.

The Problem

Lets look at the following example

<div style="opacity:0.5;background-image:url(......);">
          <div><p> Checking Transparency</p></div>
</div>

So what' going to happen here? Would this work?
The answer is yes, but there is a con to it,as we all know that child elements adopt the properties of the parent elements so in this case the opacity for the child div which displays the text would also be changed to 0.5.

So now the real question,how to overcome this?

Your solution would be something like this

<div style="opacity:0.5;background-image:url(......);">
          <div style="opacity:1;"><p> Checking Transparency</p></div>
</div>


But  this wouldn't work either because of the fact that the properties of parent element are given the most property.

The Solution

I have come across a number of solutions , I would be mentioning some of them down in this article

1.Separate div for Background

So this might not be the easiest method but this is what I used to do at the beginning when I just got started(Because I was too lazy to google regarding how to overcome this problem)

Here's the code which will help you understand how's this working

<div>
     <div style="background-image:url(......);opacity:0.5;">
     </div>
     <div> <p>We have a text with no transparency</p></div>
     <.div>
</div>


So what did we actually here?
Simple enough we didn't apply the opacity to parent element ,instead we just applied opacity to its child(which is the sibling to our element with text) ofcourse the properties of one sibling doesn't apply on another one,so yes now we have a background in a separate div which is a sibling to our div with text so the opacity of div with text is 1 now.

Note:There is a reason why we made a div with text after the div with background the reason for that is that our code runs from top to bottom so in this case the browser first applies the image then it shows the text over it, if we used the div with text before the div with background the image would come over our text.

2.RGBA Method

Another method we could use is RGBA method it looks something like this

<div style="opacity:rgba(0,0,0,0.5);">
      <div><p>Text with no transparency</p></div>
</div>

So in this case the last part of our rgba which is 0.5 is the opacity to the background of parent element,the con to this method is that the older version of internet explorer doesnt support this method.
In order to overcome this use this in your stylesheet

    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4cff66000,endColorstr=#4cff66000);


So we see an 8 digits hex code here where first 2 digits represent opacity,the second two digits represent red and so on but to apply opacity in this case you would need to use a hex calculator from here(make sure you multiply from hex into hex and answer should also be in hex):

Click here

So if i want an opacity of 0.3 I would multiply 0.3 * 225
and the answer i would get would be 66f I added 66 into the first two places in my 8 digit hex code and hola i now have a div with opacity 0.3.

Other Articles:



If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

So you might have stumbled across quite fancy looking form fields  and would have wondered how does this stuff actually work.
So we are going to start by making a simple form field which I made for one of my Login form(Click here to have a look at the form),the image has been attached below so you could get a basic idea what we would actually be making in this article.

Great Stuff? huh? 
Okay so firstly we are going to work on the initial state of the form field which would be when the form field is out of focus.Before doing anything else we should ofcourse make a form field in our html the code for which is given below.

<label for="username">Username:</label>
<input type="text" id="username" placeholder="Your Name">


Now let's get back to editing it via CSS,lets get started by adding an image to our form field for this purpose we would use background image,note that we would be customizing input#username which would mean that we are customizing our input field whose id is username

input#username {
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv3oGQ1X7N9LStvvNs1bv7jvSCi00VN8caJ19ezuMqqDLzPK1T4wZH1SbleAHjDiSdSVupu-7Dg14x2PgYrOIMO6NSdO67f01x1TpS-RVZY8ynox2O0AWf2VCKZ4CLYLJcfhI83THLoBM/s1600/user.png);
background-repeat: no-repeat;
background-position:2% 50%;
background-size:25px 80%;
text-indent: 32px;
}




Related Articles:

  






So what I actually did here is use the image from the link,added no repeat to it because of the fact that I didn't want my image to be repeated again and again through out the text field,for the positioning of the image I used background-position,background-size for ofcourse the size of the background image and the reason for the text-indent is that I don't want my text or placeholder to overlap the image therefore I moved it a bit using text-indent.

So now my form field looks like this


Now lets edit the background and stuff,for this purpose we would be adding these lines to our code


background-color:rgba(255,255,255,0.1);

If you want to understand how rgba works Click Here.

Adding the above line would make our field look like this

Now we would remove the borders by using

 border-style:none;

It becomes this

Now if you want you could make the placeholder text bolder using

 font-weight:bold;

We get a form field which looks something like this


input#username {
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv3oGQ1X7N9LStvvNs1bv7jvSCi00VN8caJ19ezuMqqDLzPK1T4wZH1SbleAHjDiSdSVupu-7Dg14x2PgYrOIMO6NSdO67f01x1TpS-RVZY8ynox2O0AWf2VCKZ4CLYLJcfhI83THLoBM/s1600/user.png);
background-repeat: no-repeat;
background-position:2% 50%;
text-indent: 32px;
background-color:white;
background-color:rgba(255,255,255,0.1);
background-size:25px 80%;
font-weight:bold;
border-style:none;
}

If you want your form field to look like this even while you are typing text and stuff in it,your work is done and you can leave this article but for those who wants to change how it look when you click it you need to read further,so now what we would be doing is customizing the form field when it is active or when it is in focus for this we would use

input#username:active,input#username:focus{


}

So,now I want to change the color of form field on click so I would add

background-color:white;

also I would like to remove that image from the form field on click so for this purpose I used 

background-image:none;

and also I changed the font from bold to normal style using

font-weight:normal;


So the code when input is on focus or active becomes:


input#username:active,input#username:focus{
background-color:white;
background-image:none;
font-weight:normal;

}


The overall code becomes:

input#username {
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv3oGQ1X7N9LStvvNs1bv7jvSCi00VN8caJ19ezuMqqDLzPK1T4wZH1SbleAHjDiSdSVupu-7Dg14x2PgYrOIMO6NSdO67f01x1TpS-RVZY8ynox2O0AWf2VCKZ4CLYLJcfhI83THLoBM/s1600/user.png);
background-repeat: no-repeat;
background-position:2% 50%;
text-indent: 32px;
background-color:white;
background-color:rgba(255,255,255,0.1);
background-size:25px 80%;
font-weight:bold;
border-style:none;
}

input#username:active,input#username:focus{
background-color:white;
background-image:none;
font-weight:normal;

}



Now if you want to add smooth transition effects add the following lines to input#username

-webkit-transition:all 0.5s ease;
 -moz-transition:all 0.5s ease 0s;

So my final code becomes


input#username {
 background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv3oGQ1X7N9LStvvNs1bv7jvSCi00VN8caJ19ezuMqqDLzPK1T4wZH1SbleAHjDiSdSVupu-7Dg14x2PgYrOIMO6NSdO67f01x1TpS-RVZY8ynox2O0AWf2VCKZ4CLYLJcfhI83THLoBM/s1600/user.png);
background-repeat: no-repeat;
background-position:2% 50%;
text-indent: 32px;
background-color:white;
background-color:rgba(255,255,255,0.1);
background-size:25px 80%;
font-weight:bold;
border-style:none;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease 0s;
}

input#username:active,input#username:focus{
background-color:white;
background-image:none;
font-weight:normal;

}

Using this method you can easily customize your form field,you can change color of text,font,text-shadow,box-shadow etc. The possibilities are endless,the only limitation is your mind.

Post your pieces of work in the comment section below.


If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page



Responsive & Animated Independence Day Widget

Related Articles:

  

  



Here's the code snippet:

<body><a href="http://roundcubee.blogspot.com"><div class="grass" style="position:fixed;bottom:0px;left:0px;width:100%;height:12%;background-repeat:no-repeat;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh63B8gy3AEN_sQpqVECvjXMJwFKoHF8QRb41KiNwnJNtzJJIasr6suFya2_AUGgLhNcZn_kF8Mx-whQTrEBq5Kri69Ld34BM6RHouAzMBzukKnziPudQDEqRHXLvndd5EbUzH5pbXiGlE/s1600/grass_PNG4937.png);background-size:100% 100%;z-index:10000000000">

<div id="flag"></div>
<div id="text"><h1 style="color:white;">Happy Independence Day</h1></div>
</div></a>

</body>


<style>
   
    body{
        background-color: #c7c7c7;
    }
#flag{
    position: absolute;
    bottom:0%;
    height:0%;
    left:10%;
    width:10%;
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8q93NtzX2z64ESLG2vuHHisszoOnN7qsJ-3x6_K_MZWKmK2jD2oXyKMqGquXejesRMh9sbid1Stn5QEaykyMHOQMZfVhDQipzvZE1O09WWOXcN89oSjkaWeRBfVDC9jp63nZKMtc0N1Y/s1600/flag.png);
    background-size: 100% 100%;
}

#text{
position:absolute;
bottom:80%;
height:100%;
right:1%;
width:70%;
text-align:center;
font-size:0px;
}


</style>

<style>
.grass:hover #flag{
 height:170%;
-webkit-transition: all 0.5s ease;
-moz-transition : all 0.5s ease 0s;
}

.grass:hover #text{
 font-size:22px;
-webkit-transition: all 1s ease;
-moz-transition : all 1s ease 0s;
text-shadow:1px 1px 33px green;
bottom:50%;
}

@media only screen and (max-width:784px)
{
.grass:hover #text{
 font-size:20px;
}
}

@media only screen and (max-width:730px)
{
.grass:hover #text{
 font-size:18px;
}

#flag{
left:2%;
width:15%;
}
}


@media only screen and (max-width:644px)
{
.grass:hover #text{
 font-size:15px;
}

#flag{
left:2%;
width:18%;
}
}

@media only screen and (max-width:543px)
{
.grass:hover #text{
 font-size:11px;
}

#flag{
left:2%;
width:20%;
}
}

@media only screen and (max-width:402px)
{
#text{
display:none;
}
   
#flag{
left:30%;
width:40%;
}


.grass:hover #flag{
height:200%;
}
}

</style>

For your website add this code just before </body> tag.
For your blog go to Layout of your template, then add a widget in the footer portion after that select the HTML/JAVASCRIPT option and paste this code there and you are done.


If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

If you like our work please don't remove the hyperlink to our Facebook page.
Animated Loader

Related Articles:

p  


Here's the source code:


</head><!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loader V3.0 by roundCube</title>
<link type="text/css" rel="stylesheet" href="style.css" />


 </head>
<body onload="animate()">
 
<div id="loader">
   <div id="inner1"></div>
   <div id="inner2"></div>
   <div id="inner3"></div>
   <div id="inner4"></div>
</div>

<div id="copyright"><a href="https://www.facebook.com/roundCubeInc?fref=ts">&#169; roundCube 2015</a></div>
 
</body>
<style >
 #loader{
     position: absolute;
     left:44%;
     top:35%;
     height: 150px;
     width:150px;
     transform: rotate(45deg);
 -webkit-transition: all 0.7s ease;
 -moz-transition : all 0.7s ease 0s;
 }
#inner1{
    position: absolute;
    top:0px;
    left:0px;
    height: 65px;
    width:65px;
    background-color: rgb(255, 163, 55);
    border-radius: 5px;
    border-width:4px;
    border-style: solid;
    border-color: rgb(255, 163, 55);;
 -webkit-transition: all 0.7s ease;
 -moz-transition : all 0.7s ease 0s;
}
#inner2{
    position: absolute;
    top:0px;
    right:0px;
    height: 65px;
    width:65px;
    background-color: rgb(255, 163, 55);;
    border-radius: 5px;
    border-width:4px;
    border-style: solid;
    border-color: rgb(255, 163, 55);;
 -webkit-transition: all 0.7s ease;
 -moz-transition : all 0.7s ease 0s;
}
#inner3{
    position: absolute;
    bottom:0px;
    left:0px;
    height: 65px;
    width:65px;
    background-color: rgb(255, 163, 55);;
    border-radius: 5px;
    border-width:4px;
    border-style: solid;
    border-color: rgb(255, 163, 55);;
 -webkit-transition: all 0.7s ease;
 -moz-transition : all 0.7s ease 0s;
}
#inner4{
    position: absolute;
    bottom:0px;
    right:0px;
    height: 65px;
    width:65px;
    background-color: rgb(255, 163, 55);;
    border-radius: 5px;
    border-width:4px;
    border-style: solid;
    border-color: rgb(255, 163, 55);;
 -webkit-transition: all 0.7s ease;
 -moz-transition : all 0.7s ease 0s;
}
#copyright{
    top:5px;
    left:0px;
    width:100%;
    height: 50px;
    color: white;
    text-align: center;
}
#copyright a{
    text-decoration: none;
    color:black;
}
 
</style>
 
 
<script>
 
   function animate(){
         var i1 = document.getElementById("inner1");
         var i2 = document.getElementById("inner2");
         var i3 = document.getElementById("inner3");
         var i4 = document.getElementById("inner4");
                var loading = document.getElementById("loader");
 

   
        if(i1.style.top!="-30px")
         {
       i1.style.top="-30px";
       i1.style.left="-30px";
       i2.style.top="-30px";
        i2.style.right="-30px";
       i3.style.bottom="-30px";
        i3.style.left="-30px";
       i4.style.bottom="-30px";
        i4.style.right="-30px";
 
         }
       else if(i1.style.background!="none"){
           loading.style.transform="rotate(135deg)";
             i1.style.background="none";
    i2.style.background="none";
        i3.style.background="none";
       i4.style.background="none";

       }
       else if(loading.style.transform!="rotate(225deg)"){
           loading.style.transform="rotate(225deg)";

       }
       else{
           i1.style.top="0px";
           i2.style.top="0px";
           i3.style.bottom="0px";
           i4.style.bottom="0px";
           i1.style.left="0px";
           i2.style.right="0px";
           i3.style.left="0px";
           i4.style.right="0px";
           loading.style.transform="rotate(45deg)"
           i1.style.background="rgb(255, 163, 55)";
           i2.style.background="rgb(255, 163, 55)";
           i3.style.background="rgb(255, 163, 55)";
           i4.style.background="rgb(255, 163, 55)";
       }
         
     
       setTimeout("animate()",600);
     

       
       
   }
 
 
</script>
</html>



If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

If you like our work please don't remove the hyperlink to our Facebook page.
 Login Form V9.0 based on Bootstrap

Here's the code snippet:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Login V9.0 By roundCube</title>
  <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
    
<body>
    <div id="form">
               
        </br>
    <form class="form" role="form">
  <div class="form-group">
    <input type="email" class="form-control  input-lg" id="email" placeholder="Email">
  </div>
  <div class="form-group">
    <input type="password" class="form-control input-lg" id="pwd" placeholder="******">
  </div>
        
          <button type="submit" class="btn btn-default btn-lg btn-block submit">LOGIN</button>
                
        </div>
<div id="copyright"><a href="https://www.facebook.com/roundCubeInc?fref=ts">&#169; roundCube</a></div>
     

</body>
    <style>
        

    #form{
        position: absolute;
        top:27%;
        left:35%;
        width:30%;
        height:310px;
    }
        
        

        input#email{
            background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3sIy64h08C3L_2nCnyUrMe-N5YbWOvlceyFMIBpvfYA4XAW05BLI9RvHmP6GgrHxFAvM15Gi4DFnK2BPmoy-U8K0yO_hSE6pm6zXMUxI95TWM9wuCI9gO5bBAtrUD0rd874PdDOLoC4s/s1600/user.jpg);
            background-size: 42px 102%;
            background-repeat: no-repeat;
            border-radius: 0px;
            text-indent: 45px;
            border-style: none;
            
        }
        
        #copyright{
            position:absolute;
            top:2px;
            height:20px;
            left:0px;
            width:100%;
            text-align:center;
        }

        #copyright a{
            text-decoration:none;
            color:#333;

        }
        
        input#pwd{
            background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjevFDxfl_tuWUBo5wkVg_ALfCYGAG0ZnfLugc9-N4cTb9eon09vAPdjUp176em9Hk_mppl7zWMnNDD-2j8yIM_LBLzwwo-3JcvPjbSOCMK497O9VIE5ASuyaFYzKRrJLJ5U-7l4uJzlFA/s1600/password.jpg);
            background-size: 43px 100%;
            background-repeat: no-repeat;
            border-radius: 0px;
            text-indent: 45px;
            border-style: none;
            
        }
        
        .submit{
            text-align: left;
            border-radius: 0px;
            background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW0xlMcu9ys_D5ACWEwQSRuEEDc1dB4acKIxXGjOP8qXpDdbAi6ST0eG-BYKyWQBPCr6hRAzOzaVe8QvTGoy1T7nt-WEOl2WgJYhLvcFBz3-nwXBDvb9TaVkJK6qNnzfflRl4bmFKO1rI/s1600/login.jpg);
            background-size: 43px 100%;
            text-indent: 45px;
            background-repeat: no-repeat;
            border-style: none;
        }
        
        @media only screen and (max-width:1040px)
        {
            #form{
                left:30%;
                width:40%;
            }
        }
        
        @media only screen and (max-width:795px)
        {
            #form{
                left:25%;
                width:50%;
            }
        }
        
        @media only screen and (max-width:634px)
        {
            #form{
                left:20%;
                width:60%;
            }
        }
            
        @media only screen and (max-width:528px)
        {
            #form{
                left:10%;
                width:80%;
            }
        }
        
        @media only screen and (max-width:393px)
        {
            #form{
                left:5%;
                width:90%;
            }
        }
        
    
    
    </style>
</html>




If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

If you like our work please don't remove the hyperlink to our Facebook page.






Animated Menu
Here's the code snippet:

<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Menu by roundCube</title>


 </head>
 
<body>

    <div id="menu">
    <nav id="navigation">
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Contact Us</a></li>
    </ul>
    </nav>
    <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi62nXV7bk_l-8-BoDwCsZpLYqsCk_oTgOQEImLH5ogSbZO97EK1qcoXeKpT2JjwdKjxOw3jD5VPWDkDY1LLrhX3a5-eUxnSX38y1KWRsKY6PVzhKQsu9j2XQVnsaBTyEhny4NUVVM1Mc/s1600/nav.png" style="height: 60px;width: 60px;top: 20px;left: 20px;position:absolute;"  onclick="menu()" />
 
 
    </div>
 
     <div id="copyright"><a href="https://www.facebook.com/roundCubeInc?fref=ts">&#169; roundCube 2015</a></div>
 
 
</body>
    <style>
    body{
        background-color: #ffff8b;
    }
 
    #menu{
        position: absolute;
        top:3%;
        left:46.25%;
        width:100px;
        height:100px;
        background-color: #887c88;
        border-radius: 50%;
        cursor: pointer;
   cursor: hand;
         -webkit-transition: all 0.5s ease;
        -moz-transition : all 0.5s ease 0s;
        border-style: none;
        border-color:#887c88;
        border-width: 4px;
    }
     
    nav{
        position: absolute;
        right:0%;
        width:88%;
        top:0%;
        height:100%;
        text-align: right;
        font-family: sans-serif;
        font-weight: 600;
    }
     
    #navigation{
        opacity: 0;
        -webkit-transition: all 0.47s ease;
        -moz-transition : all 0.47s ease 0s;
    }
 
     
    #menu ul li{
        display: inline-block;
        padding: 25px;
    }
     
        ul li a{
            text-decoration: none;
            color:white;
        }
     
        ul li:hover{
            -webkit-box-shadow:inset 0px 0px 0px 10px rgba(255,255,255,0.5);
            -moz-box-shadow:inset 0px 0px 0px 10px rgba(255,255,255,0.5);
            box-shadow:inset 0px 0px 0px 10px rgba(255,255,255,0.5);
            border-radius:3px;
        }
 
         
     
    #copyright{
        position: absolute;
        bottom:5px;
        left:0px;
        width:100%;
        height:10%;
        text-align: center;
        color:black;
    }
     
    #copyright a{
        color: black;
        text-decoration: none;
    }

 
 
 
    </style>
    <script>
        function menu(){
            var menu=document.getElementById("menu");
            var navigation=document.getElementById("navigation");
         
            if(menu.style.width!="700px")
            {
            menu.style.width="700px";
            menu.style.borderRadius="8px";
            menu.style.left="26%";
            navigation.style.opacity="1";
            }
            else{
                menu.style.width="100px";
                menu.style.borderRadius="50%";
                menu.style.left="46.25%";
                navigation.style.opacity="0";
            }

         
        }
    </script>
 
</html>



If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

If you like our work please don't remove the hyperlink to our Facebook page.
Simple Login form which popups after the specified time as soon as the page loads



The code snippet for the form is given below:


<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Popups by roundCube</title>

  <!--[if lt IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js"></script>
  <![endif]-->
  <style>
#container{
position:absolute;
top:0px;
left:0px;
height:100%;
width:100%;
background-image:url(http://www.jose-ortiz.com/images/blurred_people_bcard.jpg);
background-size:100% 100%;


}
  #popUp{
  position:absolute;
  height:360px;
  width:325px;
  left:38%;
  top:25%;
  background-color:white;
  z-index:0;
  opacity:0;
  -webkit-transition:all 1.5s ease;
  -moz-transition:all 1.5s ease 0s;


  }
  #popupImage{
  position:absolute;
  height:82px;
  width:82px;
  border-radius:50%;
  top:-11%;
  left:39%;
  background-color:white;
  background-image:url(https://scontent-mrs1-1.xx.fbcdn.net/hphotos-xta1/v/t1.0-9/10387305_969118939794326_6462601027113652936_n.jpg?oh=c3d8e25c7f0e1665ca3732f6cdcd5ea1&oe=5610CEE1);
  background-size:100% 100%;
  box-shadow:0px 4px black;




  }

  #loginForm{
  position:absolute;
  top:20%;
  height:60%;
  left:10%;
  width:80%;

  }
  .formButton{
width:90px;
height:42px;
background-color:#4882f1;
border-color:white;
border-style:none;
border-width:2px;
color:white;
border-radius:0.5px;
cursor: pointer;
cursor: hand;

}

.formButton:hover {
background-color:#0a5af3;


}

::-webkit-input-placeholder {
color: darkgray;
}

:-moz-placeholder { /* Firefox 18- */
color: darkgray;
}

::-moz-placeholder {  /* Firefox 19+ */
color: darkgray;
}

:-ms-input-placeholder {
   color: darkgray;
}
#submit{
position:absolute;
bottom:1%;
right:2%;
height:16%;
width:33%;

}

#copyright{
position:absolute;
bottom:1%;
right:1%;
color:black;
font-size:10px;

}

a{
text-decoration:none;
color:black;
}
  </style>

  <script>
  function popUpAppear() {

  var popUp = document.getElementById("popUp");

  if(popUp.style.opacity!="1" && popUp.style.opacity!="0.001")
  {
  popUp.style.opacity="0.001";
  popUp.style.zIndex=500;


  }
  else if( popUp.style.opacity!="0.002" )
  {
popUp.style.opacity="1";
popUp.style.display="block";



  }


  setTimeout("popUpAppear()",500);
}



  </script>



  </head>


  <body onload="popUpAppear()">
  <div id="container">
  <div id="popUp">

<a href="https://www.facebook.com/roundCubeInc?fref=ts"><div id="popupImage"></div></a>


<div id="loginForm">
 <form action="" method="post">
  <br/></br>
  <input name="username" type="user" placeholder=" USERNAME " style="width:245px;height:35px;text-align:center;" /><br/>
   <br/>
   <input type="password" name="password" placeholder="PASSWORD" style="width:245px;height:35px;text-align:center;"><br/>
   <br/><br/></br>
   <input type="checkbox" name="rememberme" value="yes" >Remember Me
  <div id="submit"><input name="submitted" type="submit" value="Submit" class="formButton" style="right:10px;"/></div>
  </form>

</div>
  <div id="copyright"><a href="https://www.facebook.com/roundCubeInc?fref=ts">roundCube</a></div>
  </div>
  </div>
  </body>
  </html>




Feel free to ask for snippets in the comments below or our facebook page
https://www.facebook.com/roundCubeInc


If you like our work please dont remove the hyperlink to our facebook page
Animated Text Revealer


Here's the code snippet:


<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated Text Revealer by roundCube</title>

 
 </head>
   
<body onload="animate()">
    <a href="http://www.facebook.com/roundCubeInc">
    <div id="textForRevealing">
        roundCube
        <div id="maskRight"></div>
        <div id="maskLeft"></div>
        <Div id="floater"></Div>
    </div></a>
   
</body>
   
<style>
  #textForRevealing{
      position: absolute;
      top:20%;
      left:30%;
      width:40%;
      height:77px;
      background-color: orange;
      font-size: 70px;
      text-align: center;
      font-family: sans-serif;
      text-decoration: none;
      color: black;
  }
   
#floater{
    position: absolute;
    left:0%;
    height:100%;
    top:0px;
    width:77px;
    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQyqsRQVxBjwUZmGSyODbsImNL91tAd4IaqUD5FC-kzf5D8FCluzQNqd68bhyphenhyphenF8-HZL6f6KuA8j825ytDeVdGP4l1d9brkLgN77VRvzFw252osN-LB1-_UP2ibw1RpZhJisy2PQ8z6T7Y/s1600/floater.png);
    background-size: 100% 100%;
        -webkit-transition: all 1.75s ease;
        -moz-transition : all 1.75s ease 0s;

}  
#maskRight{
    position: absolute;
    right:0px;
    width:85.8%;
    top:0px;
    height:100%;
    background-color: white;
        -webkit-transition: all 1.75s ease;
        -moz-transition : all 1.75s ease 0s;
}
   
#maskLeft{
    position: absolute;
    left:0px;
    width:0%;
    top:0px;
    height:100%;
    background-color: white;
        -webkit-transition: all 1.75s ease;
        -moz-transition : all 1.75s ease 0s;
}
   
   
</style>
   
<script>
   function animate(){
            var ml= document.getElementById("maskLeft");
            var mr= document.getElementById("maskRight");
            var floater= document.getElementById("floater");
     
       if(ml.style.width!="85.8%")
       {
           ml.style.width="85.8%";
           mr.style.width="0%";
           floater.style.left="85.8%";

       }
       else{
           ml.style.width="0%";
           mr.style.width="85.8%";
           floater.style.left="0%";  
       }
           setTimeout("animate()",1790);
   }
   
</script>
   
</html>



If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page

If you like our work please don't remove the hyperlink to our Facebook page.
Responsive login form based on Bootstrap


Here's the code Snippet:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Login</title>
  <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
  <link type="text/css" rel="stylesheet" href="style.css" />
</head>

<body style="background-image:url(http://www.mrwallpaper.com/wallpapers/gradient-background.jpg);width:100%;height:100%;">
<div class="container" >
<div id="loginForm">
<div id="loginImage">
<div id="loginImage1"><a href="https://www.facebook.com/roundCubeInc"><img src="https://scontent-fra3-1.xx.fbcdn.net/hphotos-xta1/v/t1.0-9/10387305_969118939794326_6462601027113652936_n.jpg?oh=c3d8e25c7f0e1665ca3732f6cdcd5ea1&oe=5610CEE1" class="img-responsive img-circle" alt="roundCube"></a></div>
</div>
<div id="formElements">
<form role="form">
<div class="form-group">
    
<input type="email" class="form-control input-lg" id="email" placeholder=" Your Email Address" style="background-color:black;opacity:0.5;color:white;">

</div>
</br>
<div class="form-group">
    
<input type="password" class="form-control input-lg" id="pwd" placeholder=" Your Password" style="background-color:black;opacity:0.5;color:white;">

</div>
</br>
<div class="checkbox">
<label><input type="checkbox"> Remember me</label>
</div>
</br>
<button type="submit" class="btn btn-primary btn-block btn-lg">Submit</button>
</form>



</div>


<div id="copyright"><a href="https://www.facebook.com/roundCubeInc"><p>roundCube</p></p></div>
</div>

</div>




</body>


<style>
#loginForm{
position:absolute;
height:420px;
width:30%;
top:18.5%;
left:35%;
background-color:transparent;
border-style:solid;
border-width:1px;
border-color:white;
}

#loginImage{
position:absolute;
height:100px;
width:100px;
top:-11%;
left:150px;
background-color:transparent;
border-radius:50%;
border-style:solid;
border-width:1px;
border-color:white;

}
#loginImage1{
position:absolute;
height:90px;
width:90px;
top:4%;
left:4%;
background-color:transparent;

}

#formElements{
position:absolute;
height:65%;
width:90%;
top:25%;
left:5%;
background-color:transparent;

}

#copyright{
position:absolute;
height:20px;
width:100%;
bottom:0px;
left:0px;
text-align:center;
color:white;

}

#copyright a{
color:white;
text-decoration:none;


}

@media only screen and (max-width:1166px){
#loginImage{
left:38%;

}
}

@media only screen and (max-width:959px){
#loginImage{
left:33%;

}
}

@media only screen and (max-width:793px){
#loginImage{
left:30%;

}

}

@media only screen and (max-width:621px){
#loginImage{
left:35%;

}

}

@media only screen and (max-width:593px){
#loginImage{
left:25%;

}
#loginForm{
width:50%;
left:25%;

}

}


@media only screen and (max-width:473px){
#loginImage{
left:25%;

}
#loginForm{
width:70%;
left:15%;

}

}

</style>

</html>


If you have any confusions in mind or want to ask for snippets leave a comment below or leave a message on our page