Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Style Your JavaFX with CSS > Creating Independent Style Classes

Creating Independent Style Classes

Open the default.css file once more. You are going to add a style class to this file that can be applied to any node, regardless of its type. That is, whereas you created a style previously that would only be applied to all labels, you will now create a style class that can be applied to any node you want.

Let’s create a class that rotates any node by 90 degrees. Add the following class to your default.css file:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial