I'm currently working on a website and I have a question regarding how to make text stay in position while hovering over it (inside a span), and at the same time, display an image in the background that allows the text to overlay it.
HTML:
<html>
<link REL=StyleSheet HREF="HOVERTEST_02.css" TYPE="text/css" MEDIA=screen />
<h1>FS STUDIO</h1>
<h2><span>Automation(FS1920)</span>.
<img src="https://www.applerubber.com/blog/wp-content/uploads/2015/07/Float_Glass_Unloading.jpg"/>
</h2>
<h2><span>Platforms(1819)</span>
<img src="https://njmonthly.com/wp-content/uploads/cache/2018/11/Amazon_AFradkin_4440b/1072634020.jpg"/>
</h2>
CSS:
img{
display:none;
}
span:hover + img{
display: block;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
height: 600;
width: device-width;
opacity: 0.8;
}