Membuat Kubus CSS

Belajar CSS

Sy sementara belajar CSS kembali. Sy mencoba membuat kubus. Source codenya sepertinya belum terlalu bersih dan rapi. Tapi asal jadi hihi XD

Source codenya ini :

<!–DOCTYPE html>–>
<html>
<head>
<style type=”text/css”>
#div1
{
position: absolute;
top:150px;
left:100px;
height: 200px;
width: 200px;
margin: 0px;
padding:10px;
border: none;
background-color:blue;
}

#div2
{
width:200px;
height: 60px;
padding:10px;
position: absolute;
top:70px;
left:168px;
border: none;
background-color: yellow;
transform: rotate(45deg);
transform-origin:20% 40%;
transform:skew(30deg,20deg);
-ms-transform:skew(-60deg,0deg); /* IE 9 */
-moz-transform:skew(-60deg,0deg); /* Firefox */
-webkit-transform:skew(-60deg,0deg); /* Safari and Chrome */
-o-transform:skew(-60deg,0deg); /* Opera */
}

#div3
{
width:120px;
height: 200px;
padding:10px;
position: absolute;
top:110px;
left:320px;
border: none;
background-color: lime;
transform: rotate(45deg);
transform-origin:20% 40%;
transform:skew(0deg,20deg);
-ms-transform:skew(0deg,-30deg); /* IE 9 */
-moz-transform:skew(0deg,-30deg); /* Firefox */
-webkit-transform:skew(0deg,-30deg); /* Safari and Chrome */
-o-transform:skew(0deg,-30deg); /* Opera */
}
</style>
</head>

<body>

<div id=”div1″>

</div>
<div id=”div2″></div>
<div id=”div3″>
</div>
</body>
</html>

Advertisements

About Fachrie Lantera

Seseorang dapat dinilai dari tulisannya. Saya seorang yang senang membaca tulisan seseorang dan mengenalnya lewat tulisannya.
This entry was posted in Ilmu Komputer. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s