Difference between revisions of "Team:Toronto/WetLab/ExperimentProtocols"

Line 19: Line 19:
 
<body>
 
<body>
  
<h2>Image Modal</h2>
+
<img id="myImg" src="https://www.w3schools.com/howto/img_snow.jpg" alt="Snow" style="width:100%;max-width:300px">
<p>In this example, we use CSS to create a modal (dialog box) that is hidden by default.</p>
+
<p>We use JavaScript to trigger the modal and to display the current image inside the modal when it is clicked on. Also note that we use the value from the image's "alt" attribute as an image caption text inside the modal.</p>
+
 
+
<img id="myImg" src="img_snow.jpg" alt="Snow" style="width:100%;max-width:300px">
+
  
 
<!-- The Modal -->
 
<!-- The Modal -->

Revision as of 19:58, 10 August 2018

Snow