In my HTML code, I have a div
element and an image
tag stacked one on top of the other. The div
is smaller than the image
.
I have set the overflow property to visible for the div
. My query is, when I add an image to the image tag, the content that overflows through the div should have an opacity of 0.5.
This is how it currently appears... Any assistance?
<div style="border-style: solid; border-width: 2px; height: 5cm; width: 8cm;top: 20px; left: 20px; position:relative; overflow:visible;" id="divimg">
<img src="https://example.com/image.jpg" id="displayimg" style="height: 7cm; width: 10cm;" />
</div>