current position:Home>Less learning notes tutorial
Less learning notes tutorial
2022-04-29 16:15:28【Study diary】
less
Introduce
Chinese net :https://less.bootcss.com/
Less (Leaner Style Sheets Abbreviation ) Is a backward compatible CSS Extended language . What is presented here is Less Official documents of ( Chinese version ), Contains Less Language and use JavaScript Developed to bring Less Convert styles to CSS Styling Less.js Tools .
because Less and CSS Very much like , So it's easy to learn . and Less Only on CSS The language adds a few convenient extensions , This is it. Less One of the reasons why it is so easy to learn .
Environmental preparation
vscode Download and install
Study less We need to learn before less Environment , Here, we use vscode,vsCode It's a lightweight editor , Microsoft development , Many of them have a large number of plug-ins , It is also a widely used editor at the front end .
Introduce ( From Baidu Encyclopedia ):
without vscode, Download address :https://code.visualstudio.com/
Download it like qq Just install it as before , It's simple , There is no more demonstration here ;
After downloading , We only need to install a plug-in , Just like the , Look at the steps below :
After installation, create a new one less Folder as our working directory :
Quick start
1、 Create a new folder less01, Create a new one hello.less
2、 In the catalog , Create a new one index.html file , Enter a ! Prompt appears , enter , You can quickly generate a html structure , We introduce... Into the page hello.css, Write the following code
hello.less Code
@width: 100px;
@height: 100px;
@boxColor:red;
#box{
width: @width;
height: @height;
background-color: @boxColor;
}
css The code is preprocessed , You don't have to write , That's true :
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>less01</title>
<link rel="stylesheet" href="hello.css">
</head>
<body>
<div id="box"></div>
</body>
</html>
You can double-click to open index.html page , You can see the effect , Here is another easy to use vscode plug-in unit Live Server, You can directly right-click the file to open , You can run to the browser , This is not simply opening a file , But in vscode There is a built-in server , Open the web page through the server , It should be running, and the web page will pop up automatically in the browser , without , Enter the address in the browser address bar http://127.0.0.1:5500/less01/index.html, Can access
Running results , You'll get one 100px A small square red box :
Variable
Updating in succession ······
Basic grammar
function
copyright notice
author[Study diary],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291426421205.html
The sidebar is recommended
- Software design pattern -- Chapter 3 structural pattern -- sharing element pattern
- Vue uses the online form of Excel in the front end of lucky sheet to import, display and export Excel files
- Vue uses echart to draw national maps and overlay charts
- Vue + element UI: Vue user-defined instruction monitors the scrolling event of El table to scroll the scroll bar to the bottom and load new data
- Vue + element when there is no paging at the back end, the front end completes the paging of El table independently - scrolling to the bottom to load new data
- [react] react routing concept
- Lenovo z475 disassembly and repair - plate No. kl6c
- Random array into an array, requiring that the elements cannot be repeated
- The belated Toyota bz4x, even with the blessing of e-tnga architecture, is still not worth starting
- In element plus, for example, how to change the checkbox status in the list by clicking on the header and selecting all
guess what you like
Crawler reverse advanced, using ast technology to restore JavaScript obfuscated code
Help, after changing the user name, the computer is useless and can't log in
Drag the left column of Vue and keep the right width unchanged; The scroll bar appears
HTML notes
In depth analysis of headless single linked list -- dynamic diagram demonstration of C language
Share 9 development skills related to vue3
CSS box centered
Used in Vue projects Sync modifier and $emit (update: XXX)
Vue class & Style binding and computed
Vue project uses this$ forceUpdate(); Force render page
Random recommended
- HTTP becomes HTTPS, self-made certificate
- Web front-end operation - tourism enterprise marketing publicity responsive website template (HTML + CSS + JavaScript)
- Self inspection list of a [qualified] front-end Engineer
- This principle in JavaScript and six common usage scenarios
- JavaScript this priority
- Analyzing the principle of HTTPS encryption
- Difference and principle between websocket and http
- Use of elementui scroll bar component El scrollbar
- Nginx security optimization
- GAC group has become the first pilot enterprise of "yueyouhang". Blessed are the car owners in Guangdong!
- Loki HTTP API usage
- JavaScript - prototype, prototype chain
- Front end experience
- JavaScript -- Inheritance
- HTTP cache
- Filters usage of table in elementui
- A JavaScript pit encountered by a non front-end siege lion
- Grain College - image error when writing Vue with vscode
- Utility gadget - get the IP address in the HTTP request
- Could not fetch URL https://pypi.org/simple/pytest-html/: There was a problem confirming the ssl cer
- Function of host parameter in http
- Use nginx proxy node red under centos7 and realize password access
- Centos7 nginx reverse proxy TCP port
- In eclipse, an error is reported when referencing layuijs and CSS
- Front end online teacher Pink
- Learn to use PHP to insert elements at the specified position and key of the array
- Learn how to use HTML and CSS styles to overlay two pictures on another picture to achieve the effect of scanning QR code by wechat
- Learn how to use CSS to vertically center the content in Div
- Learn how to use CSS to circle numbers
- Learn to open and display PDF files in HTML web pages
- The PHP array random sorting function shuffle() randomly scrambles the order of array elements
- JQuery implements the keyboard enter search function
- 16 ArcGIS API for JavaScript 4.18 a new development method based on ES modules @ ArcGIS / core
- 17 ArcGIS API for JavaScript 4.18 draw points, lines and faces with the mouse
- 18 ArcGIS API for JavaScript 4.18 obtain the length and area after drawing line segments and surface features
- Vue environment construction -- scaffold
- Build a demo with Vue scaffold
- Using vuex in Vue projects
- Use Vue router in Vue project
- 26 [react basics-5] react hook