Is it possible to change the background of the page when an option is selected from a dropdown menu?
Additionally, can this be achieved with a smooth fade in and fade out animation?
Here is a code example on CodePen.
body {
background-image: url("http://www.manners.nl/wp-content/uploads/2014/08/Manners-stijlvolste-steden-londen-6.jpg");
background-attachment: fixed;
background-position: 50% 50%;
background-size: cover;
}
<div class="container">
<br><br><br>
<select class="form-control select">
<option> Show London Background Picture</option>
<option> Show Paris Background Picture</option>
<option> Show Italy Background Picture</option>
</select>
<br>
<div class="jumbotron">
IF LONDON SELECTED THEN BACKGROUND: <br>http://www.manners.nl/wp-content/uploads/2014/08/Manners-stijlvolste-steden-londen-6.jpg<br><br>
IF PARIS SELECTED THEN BACKGROUND: <br>
http://travelnoire.com/wp-content/uploads/2013/12/eiffel-tower-paris-2.jpg<br><br>
IF ITALY SELECTED THEN BACKGROUND: <br>
https://upload.wikimedia.org/wikipedia/commons/5/53/Colosseum_in_Rome,_Italy_-_April_2007.jpg
</div>
</div>