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

  • Learning Less.js
  • Alex Libby
  • 193字
  • 2021-09-03 09:38:08

Creating the foundation page

Now that we have downloaded the library, the next stage is to set up our base project that we can reuse throughout this book. This is going to be a simple HTML5 document, which will contain the basic skeleton we will need for our projects.

For my code editor, I will be using Sublime Text 2, for which we set up support for Less back in Chapter 2, Building a Less Development Toolkit. This is available for download from Sublime Text's website at http://www.sublimetext.com/2, although you can use whichever editor you are most comfortable with.

Let's start by creating our base project file. In a new folder called lessjs, create a new file and add the following code:

<!DOCType html>
<head>
  <meta charset="utf-8">
  <title>Untitled</title>
  <link rel="stylesheet/less" href="css/project.less">
</head>
<body>
</body>
</html>

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Save this as project.html. We'll make reference to this throughout the book and it will be the basis for each of our projects when using Less.

主站蜘蛛池模板: 晋宁县| 台北县| 横山县| 电白县| 武义县| 太保市| 永和县| 将乐县| 酒泉市| 钟山县| 得荣县| 柏乡县| 自贡市| 北川| 南郑县| 墨玉县| 房山区| 平利县| 华安县| 集贤县| 皋兰县| 塘沽区| 台安县| 垣曲县| 贵南县| 和顺县| 米林县| 齐河县| 泗阳县| 淅川县| 甘孜县| 南召县| 长沙市| 南岸区| 海城市| 综艺| 清原| 赫章县| 聊城市| 铜鼓县| 卓资县|