We would like to know how to change tag color by browser size.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.topbar {<!-- w w w . j a v a 2 s. com-->
background-color: green
}
@media screen and (min-width: 1250px) {
.topbar {
background-color: red
}
}
</style>
</head>
<body>
<div class="topbar">The top bar</div>
</body>
</html>
The code above is rendered as follows: