Program to write text / watermark inside an image





C S Psyco

This is a simple implementation of a text on an image.The text added to the image is styled as a watermark using the property opacity. The opacity property in css is used to add transparency of that particular text or an element. The code of the given program is given below.


Code:



<html>
<head>
<title>Implementation of text on image withopacity </title>
<style>
.onimg
{
position:relative;
}
.inside
{
position:absolute;

left:25%;
top:50%;
color:white;
font-size:300%;
opacity:.5;
}
</style>
</head>
<body>
<div class="onimg">
<img border="0"
data-original-height="1600"
data-original-width="1200"
height="400" src="https://2.bp.blogspot.com
/-0Lf3ouhmR98/XRSmdLYngnI/A
sjM4jN1zZ78ruSffJcJ1hFRq8Ol
ltwGmLgCLcBGAs
s400/IMG_20190624_161121.jpg"
 width="300" />
<br />
<div class="inside">
C S Psyco
</div>
</div>
</body>
</html>


Thank You...Stay Updated


Comments

Post a Comment

Popular posts from this blog

Node.js Cheat Sheet

Codeigniter ! Simple But Powerful

Introducing Cloudflare Pages ⚡