demo_02 less
html 中的代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet/less" type="text/css" href="css/style.less"/>
<script src="js/less.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div>0</div>
<ul>
<li class="special">1</li>
<li>2</li>
<li class="special"><a class="a">3</a></li>
<li>4</li>
<li>5</li>
</ul>
</body>
</html>
css中Less文件内容
@background-color:#f66;
.border-radius (@radius) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
}
.border-shadow(@x,@y,@z,@color){
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
box-shadow: @arguments;
}
@base-color: #111;
@red: #842210; .border{
border: 20px solid #ddd;
text-align: center;
margin-top: 3px;
.border-radius(5px);
.border-shadow(3px,3px,5px,#000);
// color: @base-color + #003300;
// 饱和度降低 10%
// border-color: desaturate(@red, 10%);
}
div{
width: 120px;
height: 120px;
background: @background-color;
.border;
}
ul>li{
width: 50px;
height: 20px;
background: @background-color;
.border;
&.special{
font-size: 40px;
.a{
color: red;
}
} }
js中的less.min.js可以自行到网上下载,最新版本的即可。
demo_02 less的更多相关文章
- Java多线程学习笔记
进程:正在执行中的程序,其实是应用程序在内存中运行的那片空间.(只负责空间分配) 线程:进程中的一个执行单元,负责进程汇总的程序的运行,一个进程当中至少要有一个线程. 多线程:一个进程中时可以有多个线 ...
- java基础-day25
第02天 java基础加强 今日内容介绍 u Properties的基本操作 u 反射综合案例 u BeanUtils概述及使用 第1章 Properties的基本操作 1.1 Properti ...
- SpringBoot从入门到精通二(SpringBoot整合myBatis的两种方式)
前言 通过上一章的学习,我们已经对SpringBoot有简单的入门,接下来我们深入学习一下SpringBoot,我们知道任何一个网站的数据大多数都是动态的,也就是说数据是从数据库提取出来的,而非静态数 ...
- 初始 Tronado
安装 pip 安装 pip install tronado 手动安装 下载tronado安装包(https://pypi.python.org/packages/source/t/tornado/to ...
- SpringMVC重定向路径中带中文参数
SpringMVC重定向路径中带中文参数 springboot重定向到后端接口测试 package com.mozq.http.http_01.demo; import org.springframe ...
- Java常用类Date相关知识
Date:类 Date 表示特定的瞬间,精确到毫秒. 在 JDK 1.1 之前,类 Date 有两个其他的函数.它允许把日期解释为年.月.日.小时.分钟和秒值.它也允许格式化和解析日期字符串. Dat ...
- 【2】Git仓库
一.获取 Git 仓库 初始化仓库 ##基于当前目录初始化仓库 $ git init ##指定demo目录初始化仓库 $ git init demo 克隆现有仓库 ##克隆现有的仓库,默认目录名:li ...
- 项目打jar包和运行
打包成jar包和部署,运行. 1.在pom.xml中加入 <packaging>jar</packaging> <groupId>com.demo02</g ...
- 免费 https 申请步骤,你必须知道
不适用 https 加密的网站,基本上就等于在裸奔. 来,开始开始动手做 我的系统是 CentOS6 第一步:安装Certbot Certbot可以用于管理(申请.更新.配置.撤销和删除等)Let's ...
随机推荐
- HDU 4714 Tree2cycle DP 2013杭电热身赛 1009
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4714 Tree2cycle Time Limit: 15000/8000 MS (Java/Other ...
- 机器学习-review-1 线性回归
发现隔一段时间,忘记了好多知识点,这里认为重要的知识点记录下来,作为笔记,方便以后回顾. From “李航- 统计学习方法” 统计学习方法的三要素: 模型,策略, 算法 对于线性回归 -------- ...
- make it clear how to use const in C++
1.first of all,take a lookup on the left side of keyword const.If there is something(type or pointer ...
- MVC母版面,子页的脚本生成在最后
- mvc Html.BeginForm 生成 ?Length=
今天再做mvc Html.BeginForm的方法的时候发现提交的时候都会带length= ,后面查看网上文档资料是后台model设置最小长度生成的 改成 @using (Html.BeginFor ...
- Servlet文件上传(ServletFIleUpload,DiskFileItemFactory,FileItem)
1:我们学的是表单文件上传,就是在一个FORM中提交相应的信息,和之前我们的提交的注册信息之类的表单是不同的,所以要先改变一下FORM的属性,enctype="multipart/form- ...
- [C#] 常用工具类——加密解密类
using System; using System.Configuration; using System.Collections.Generic; using System.Text; using ...
- HDU-4879-ZCC loves march(map+set+并查集)
Description On a m*m land stationed n troops, numbered from 1 to n. The i-th troop's position can be ...
- android Fragments详解六:处理fragement的生命周期
把条目添加到动作栏 你的fragment们可以向activity的菜单(按Manu键时出现的东西)添加项,同时也可向动作栏(界面中顶部的那个区域)添加条目,这都需通过实现方法onCreateOptio ...
- hadoop错误org.apache.hadoop.util.DiskChecker$DiskErrorException Could not find any valid local directory for
错误: org.apache.hadoop.util.DiskChecker$DiskErrorException: Could not find any valid local directory ...