How Can I Use Cascading Style Sheets Clip Property

admin_img Posted By Bajarangi soft , Posted On 27-11-2020

In CSS The clip property lets you specify a rectangle to clip an absolutely positioned element. The rectangle is specified as four coordinates, all from the top-left corner of the element to be clipped.So today we discuss how to do it.

How Can I Use Cascading Style Sheets Clip Property

Complete Code For Using Cascading Style Sheets Clip Property.

<!DOCTYPE html>
<html>
<head>
    <title>How Can I Use Cascading Style Sheets Clip Property</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
</head>

<style>
    * {
        box-sizing: border-box;
    }

    body {
        background-color: #777891;
    }
    img {
        position: absolute;
        clip: rect(0px,60px,200px,0px);
    }
</style>
<body>
<br/><br/>
<div class="container">
    <br>
    <div class="text-center">
        <h1 id="color" style="color: white;">Cascading Style Sheets Clip Property</h1>
    </div>
    <div class="well">
        <img src="../image/demo7.jpg" width="100" height="140">
    </div>
</div>
</body>
</html>

Related Post