Wednesday 1 March 2017

Html Diamond - HTML code

<!DOCTYPE html>
<!-- https://www.sitepoint.com/community/t/diamond-with-text-centered/35376/3 -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="robots" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />


<!--css-->
<link rel="stylesheet" href="css/master.css" />
<style type="text/css">
    * {
        padding: 0;
        font: 16px Helvetica, sans-serif;
    }

    .diamond {
        margin: 50px;
        width: 100px;
        height: 100px;
        background: red;
        transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
        border-radius:15px;
    }

    .diamond-inner {
        margin: 50px;
        color: #fff;
        font-weight: bold;
        font-size: 1.2em;
        line-height: 1.4em;
        text-align: center;
        transform: rotate(-45deg);
        -ms-transform: rotate(-45deg);
        -webkit-transform: rotate(-45deg);
        width:100px;
        height: 100px;
        display: table-cell;
        vertical-align: middle;
        text-align: center;
        border-radius:15px;
    }

</style>

<!--[if lt IE 9]>
         <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<title>Title of the document</title>
</head>
<body>
    <div class="diamond">
        <div class="diamond-inner"> Business Starter </div>
    </div>
</body>
</html>

No comments:

Post a Comment