Build with DOM Elements
View and DOM
View is made up of one or multiple DOM elements. In other words, a view utilizes HTML 5 and CSS 3 to display the content to meet the requirement. In additions, the view interacts with the user by listening the DOM event sent by the DOM elements.
Though rarely, you can draw the content in the fully customized way with
It all depends on the requirement and whether HTML + CSS matches what you need. In additions, the top element can be found by use of
Here is an example.
ScrollView is made of two DIV elements, and the DOM elements of the child views are placed in the inner DIV element. On the other hand,
TextBox is made of one INPUT element, and
Button made of one BUTTON element.
To interact with the user,
ScrollView will listen the touch and mouse event for handling the scrolling.
- Two CSS classes are always assigned:
clsnmis the view's class name
v-CSS class has two important CSS rules that you shall not change:
v-clsnmis used to customize the look of a given type of views.
- The position and dimension of a view (i.e., left, top, with and height) can only be measured in pixels. It doesn't support
emand other units of measurement.