Difference between revisions of "Team:SDU-Denmark/Model"

Line 143: Line 143:
 
}
 
}
 
</style>
 
</style>
</head>
 
<body>
 
  
<h2>Image Modal</h2>
+
 
<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="https://static.igem.org/mediawiki/2016/e/e1/T--BIT-China--img--pumpkin.png" alt="Trolltunga, Norway" width="300" height="200">
 
<img id="myImg" src="https://static.igem.org/mediawiki/2016/e/e1/T--BIT-China--img--pumpkin.png" alt="Trolltunga, Norway" width="300" height="200">

Revision as of 14:52, 18 October 2016

The Best


Trolltunga, Norway