Stylesheet

Add stylesheets to our App.

Directly utilize CSS in our app

We’ll start with using a simple stylesheet as we would for any other static website. For that, we first need a CSS file, and we’ll call it app.css.

Press + to interact
body{
font-family: Arial, sans-serif;
}
.submitBtn {
margin: 10px;
color: darkgreen;
width: 60px;
}
.deleteBtn {
color: darkred;
}
.editBtn {
color: blue;
}
button {
margin-right: 5px;
width: 60px;
}
.editing {
color: blue;
}
.adding {
color: darkgreen;
}

Using HTML element type

Some of the selectors in our CSS file apply directly to an HTML element type, and some use a named CSS class selector. The style attributes for the native element selectors will be automatically applied to the referenced element, like ...