官术网_书友最值得收藏!

Adding a Cascade Style Sheet to the web user interface

Cascade Style Sheet (CSS) defines how HTML elements are to be displayed. Metro UI CSS (https://metroui.org.ua/) is a cascade style sheet that can be used to apply Windows 8-like style to your HTML elements.

The following Arduino sketch applies Windows 8-like style to the radio button group:

  1. Open your Arduino IDE and paste the code from the sketch named B04844_01_05.ino from the code folder of this chapter.
  2. Between the <head></head> tags we have first included the JQuery library which consists of a rich set of JavaScript functions:
    client.println("<script src=\"https://metroui.org.ua/js/jquery-2.1.3.min.js\"></script>");
  3. Then, we have included metro.js and metro.css from the https://metroui.org.ua website:
    client.println("<script src=\"https://metroui.org.ua/js/metro.js\"></script>");
    client.println("<link rel=\"stylesheet\" href=\"https://metroui.org.ua/css/metro.css\">");

Upload the sketch on your Arduino board and play with the new look and feel. You can modify the other HTML elements and even use the radio buttons by referring to the MetroUI CSS website documentation at https://metroui.org.ua/.

Adding a Cascade Style Sheet to the web user interface

MetroUI CSS style applied to radio buttons

主站蜘蛛池模板: 吉林省| 木兰县| 盐亭县| 新源县| 周宁县| 庆安县| 镇远县| 瑞安市| 修水县| 大渡口区| 永济市| 抚州市| 乐山市| 松桃| 杨浦区| 嘉定区| 宁河县| 阳泉市| 静安区| 玉龙| 渝中区| 泸水县| 宁城县| 电白县| 嘉祥县| 阜阳市| 玉田县| 阿巴嘎旗| 东辽县| 禄劝| 大足县| 太仆寺旗| 凌云县| 融水| 嵊州市| 乌鲁木齐市| 贵定县| 全椒县| 阿拉善右旗| 尖扎县| 绥滨县|