I'm relatively new to HTML/CSS and have been trying to get a filter over a specific part of my background image. Here is what I have so far that is not working as intended:
<!DOCTYPE html>
<html lang = "en">
<head>
<meta charset="utf-8">
<title>Test</title>
<style>
#test {
overflow: hidden;
position: absolute;
top: 200px;
left: 200px;
width: 200px;
height: 200px;
border: 5px solid black;
}
test img{
position: absolute;
clip: rect(200px,1000px,1000px,200px);
}
</style>
</head>
<body>
<img src="media/image2.jpg" alt="Test Image">
<div id="test">
<img src="media/image2.jpg" alt="Test Image">
</div>
</body>
</html>
I want the part of the image inside of the black border to be consistent with the background so that I can apply a filter to that image later and make it appear as tough that area has a filter applied directly to it. Please let me know if there is a more simple way to do this. I'm not allowed to use JavaScript.