Edit This Code:
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<style>
.sky {
    color:white;
    background-color:lightblue;
    padding:20px;
    font-family:"Courier New";
}

.tomato {
    background-color:coral;
    padding:40px;
    font-family:Verdana;
}

</style>
<body ng-app="">

<p>Choose a class:</p>

<select ng-model="home">
<option value="sky">Sky</option>
<option value="tomato">Tomato</option>
</select>

<div ng-class="home">
  <h1>Welcome Home!</h1>
  <p>I like it!</p>
</div>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy