RIOT.JS Tutorial
Selected Reading
- RIOT.JS - Discussion
- RIOT.JS - Useful Resources
- RIOT.JS - Quick Guide
- RIOT.JS - Observables
- RIOT.JS - Mixin
- RIOT.JS - Loops
- RIOT.JS - Accessing DOM
- RIOT.JS - Event Handling
- RIOT.JS - Yield
- RIOT.JS - Conditional
- RIOT.JS - Styling
- RIOT.JS - Expressions
- RIOT.JS - Tags
- RIOT.JS - First Application
- RIOT.JS - Environment Setup
- RIOT.JS - Overview
- RIOT.JS - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
RIOT.JS - Styling
RIOT.JS - Stypng
RIOT js tags can have their own style and we can define styles within tags which will affect only the content within the tag. We can also set a style class using scripts as well within a tag. Following is the syntax how to achieve stypng of RIOT tags.
custom1Tag.tag
<custom1Tag> <h1>{title}</h1> <h2 class = "subTitleClass">{subTitle}</h2> <style> h1 { color: red; } .subHeader { color: green; } </style> <script> this.title = "Welcome to TutorialsPoint.COM"; this.subTitle = "Learning RIOT JS"; this.subTitleClass = "subHeader"; </script> </custom1Tag>
index.htm
<!DOCTYPE html> <html> <head> <script src = "https://cdnjs.cloudflare.com/ajax/pbs/riot/3.13.2/riot+compiler.min.js"></script> </head> <body> <h1>Non RIOT Heading</h1> <custom1Tag></custom1Tag> <script src = "custom1Tag.tag" type = "riot/tag"></script> <script> riot.mount("custom1Tag"); </script> </body> </html>
This will produce following result −
Advertisements