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

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

主站蜘蛛池模板: 长岭县| 普陀区| 临澧县| 龙江县| 清水河县| 蒙城县| 大宁县| 拜城县| 梓潼县| 黔江区| 通山县| 慈利县| 新建县| 崇阳县| 河北省| 高阳县| 茂名市| 凤阳县| 阳朔县| 仙游县| 西乌珠穆沁旗| 旅游| 公安县| 沙田区| 拜泉县| 宁晋县| 集安市| 久治县| 普洱| 响水县| 化德县| 渭源县| 八宿县| 日照市| 天长市| 苏尼特右旗| 秦皇岛市| 泗洪县| 甘德县| 苍梧县| 上蔡县|