Friday, December 17, 2021

Image Cutout Text Effect

Image Cutout Text Effect


 <!DOCTYPE html>

<html>


<head>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="STYLESHEET" type="text/css" href="web.css">

    <title>web design</title>

</head>


<body>

 <h1>CSS Cutout Effect</h1>

 <div class="container">

     <div class="text">NATURE</div>

 </div>

 <p>This example creates a responsive cutout text/knockout text - text that appears cut out on top of a background image.</p>

<p>Resize the browser window to see the responsive effect.</p>

<p><strong>Note:</strong> This example does not work in Internet Explorer or Edge.</p>

</body>


</html>


CSS Image Cutout Text Effect Style

 body{

  font-family: Arial, Helvetica, sans-serif;

}

.container{

  background-image:url(hero.jpg) ;

  background-size: cover;

  position: relative;

  height:300px;

}

.text{

  background-color: white;

  color: #000;

  font-size:10vw;

  font-weight: bold;

  margin:0 auto;

  padding: 10px;

  width:50%;

  text-align: center;

  position: absolute;

  top:50%;

  left:50%;

  transform: translate(-50%,-50%);

  mix-blend-mode: screen;

}

No comments:

Post a Comment

JavaScript Animated

  JavaScript Animated <!DOCTYPE html> <html> <style> #myContainer {   width: 400px;   height: 400px;   position: relative;...