Background Image(tut19).html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colours In CSS</title>
<style>
#firstPara{
color:red; /* color by name */
}
#secondPara{
/* color by rgb value */
color:rgb(214, 100, 48);
}
#thirdPara{
/* color by hex value */
/* color:#c52fc5;
background-color: #ff4532; */
height:500px;
width: 455px;
background-image: url('https://www.codewithharry.com/static/home/img/photo.png');
border:2px solid red;
background-repeat: no-repeat;
/* repeat-x and repeat-y will take it repeat on x and y axis */
/* background-position:center right; */
background-position:center center;
/* background-position:top center; */
/* background-position:top right; */
/* background-position:top left; */
/* background-position:122px right; */
/* background-position:122px 43px; */
}
</style>
</head>
<body>
<h2>This is my first box</h2>
<p id="firstPara">This is a paragraph from first box</p>
<h2>This is my first box</h2>
<p id="secondPara">This is a paragraph from second box</p>
<h2>This is my first box</h2>
<p id="thirdPara">This is a paragraph from Third box</p>
</body>
</html>
Comments
Post a Comment