Less实践第二篇

把调用部分与函数(含变量声明)部分,分开放置。可以看出 less是很方便的样式编程语言

@charset "utf-8";
@import "reset.css";
@import "classes.less";
@import "buttons.css";
/* style.less - 样式通用文档
---------------------------------------------------------------- */


html,body{height:100%;}

body{
	background:#fffff;	
	.rainbow-gradient(45deg,#ff0000,#ffb600,#fff600,#a5ff00,#00a9ff,#0400ff,#8a00fc, #ff00e9, #ff0059);
	}
a:link,a:visited{
	color:#4a4a4a;text-decoration:none;
	}




#button-wrap{
  position:absolute;
  width:@wrap_width;
  margin:100px (100%-@wrap_width)/2 0;
  border:1px solid #f8f8f8;
  border-color:rgba(237,237,237,0.48);
  padding:10px;
  background:#e7e7e7;
  background:rgba(237,237,237,0.48);
  text-align:center;
  .box-shadow(0px,0px,4px,#787878);

}

.button{
		text-decoration:none !important;
		cursor:pointer;
		display:inline-block;
		border:1px solid #ccc;
		padding:1em  1.5em;
		background-color:#e0e0e0;
		margin:50px 10px auto 50px;
		color:#232323;
		font:14px/1 Verdana, Arial, Sans-serif;
		text-shadow:1px 1px #f2f2f2;
		.inset-box-shadow(0px,0px,4px,#787878);
		.button-gradient;
		 &:hover,&:focus
		 {
			 outline:0;
			.button-gradient(#eee,none,#fff,#c0c0c0);
		 
		 }
			&.ko{font-family:Sans-serif;}
			&.xx-smalll{font-size:10px;}
			&.x-smalll{font-size:11px;}
		    &.smalll{font-size:12px;}
		    &.big{font-size:18px;}
			&.x-big{font-size:20px;}
			&.xx-big{font-size:22px;}
			
			
			
			&.round{
					  .boder-radius(5px);
					
					}
			&.rounder{
					  .boder-radius(15px);
					
					}
			&.roundest{
					 .boder-radius(30px);
					
					}	
			
			&.ani{
			         background-image:@img_url;
					 background-repeat:no-repeat;
					 background-position:left bottom,right top,0 0;
					.button-gradient(#eee,@img_url,#fff,#c0c0c0);
					
					.transition;
					 &:hover,&:focus{
						 background-position:left bottom,right top,0 0;
						.button-gradient(#eee,@img_url,#fff,#c0c0c0);
						  
					  }
					
			      }
			
			
			&.red{
			   border:1px solid #8c484f;
			   color:#121212 !important;
			   .button-gradient(@red_bc,none,@red_bc,@red_ec);
			   &.ani{
			         .button-gradient(@red_bc,@img_url,@red_bc,@red_ec);
					}
			    }
				
			&.orange{
			   border:1px solid #89614A;
			   color:#121212 !important;
			   .button-gradient(@red_bc,none,@red_bc,@red_ec);
			   &.ani{
			         .button-gradient(@red_bc,@img_url,@red_bc,@red_ec);
					}
			    }
				
			&.yellow{
			   border:1px solid #d1c78c;
			   color:#121212 !important;
			   .button-gradient(@red_bc,none,@red_bc,@red_ec);
			   &.ani{
			         .button-gradient(@red_bc,@img_url,@red_bc,@red_ec);
					}
			    }
				
				
				&.green{
			   border:1px solid #6c8e3b;
			   color:#121212 !important;
			   .button-gradient(@red_bc,none,@red_bc,@red_ec);
			   &.ani{
			         .button-gradient(@red_bc,@img_url,@red_bc,@red_ec);
					}
			    }
				
				&.blue{
			   border:1px solid #3665ac;
			   color:#121212 !important;
			   .button-gradient(@red_bc,none,@red_bc,@red_ec);
			   &.ani{
			         .button-gradient(@red_bc,@img_url,@red_bc,@red_ec);
					}
			    }
			
  }
	
	
/*函数和变量
---------------------------------------------------------------- */
@wrap_width:60%;

@img_url:url(../images/button_bg.png);

@red_bc:#e80408;
@red_ec:#6d0019;

.rainbow-gradient(@deg:0deg,
			@c1:red,
			@c2:orange,
			@c3:yellow,
			@c4:green,
			@c5:blue,
			@c6:pink,
			@c7:purple,
			@c8:pink,
			@c9:red
			


){
     background-image:linear-gradient(@deg,@c1 0%, @c1 11%, 
						@c2 11%, @c2 22%, @c3 22%,@c3 33%,@c4 33% ,@c4 44%,@c5 44% 
						,@c5 55%,@c6 55%,@c6 66%,@c7 66%,@c7 77%, @c8 77%,@c8 88%,
						@c9 88%, @c9 100%);
     background-image:-moz-linear-gradient(@deg,@c1 0%, @c1 11%, 
						@c2 11%, @c2 22%, @c3 22%,@c3 33%,@c4 33% ,@c4 44%,@c5 44% 
						,@c5 55%,@c6 55%,@c6 66%,@c7 66%,@c7 77%, @c8 77%,@c8 88%,
						@c9 88%, @c9 100%);
	

}




.box-shadow(@x:1px,@y:1px,@blur:0px,@color:#212121){
   -webkit-box-shadow:@arguments;
   -moz-box-shadow:@arguments;
   box-shadow:@arguments;
 }
 
 
 .inset-box-shadow(@x:1px,@y:1px,@blur:0px,@color:#212121){
   -webkit-box-shadow:inset@x @y @blur @color;
   -moz-box-shadow:inset@x @y @blur @color;
   box-shadow:inset@x @y @blur @color;
 }
 
 .button-gradient(@bgc:#e5e5e5,@img_url:none,@bs:#fff,@be:#cecece){
   background-color:@bgc;
   background-image:@img_url,@img_url,-moz-linear-gradient(@bs,@be);
   background-image:@img_url,@img_url,-webkit-gradient(linear,left top,left bottom,from(@bs),to(@be));
   background-image:@img_url,@img_url,-webkit-linear-gradient(@bs,@be);
	
	background-image:@img_url,@img_url,-o-linear-gradient(@bs,@be);
    background-image:@img_url,@img_url,-ms-linear-gradient(@bs,@be);	
	background-image:@img_url,@img_url,linear-gradient(@bs,@be);
 }

.boder-radius(@radius:8px){

  border-radius:@radius;
  -webkit-border-radius:@radius;
  -moz-border-radius:@radius;
  -khtml-border-radius:@radius;
}

.transition(@prop:all,@duration:0.4s,@easing:ease,@delay:0s){
  -webkit-transition:@prop,@duration,@easing,@delay;
  -moz-transition:@prop,@duration,@easing,@delay;
  -o-transition:@prop,@duration,@easing,@delay;
  -ms-transition:@prop,@duration,@easing,@delay;
  transition:@prop,@duration,@easing,@delay;
}


基于数据驱动的 Koopman 算子的递归神经网络模型线性化,用于纳米定位系统的预测控制研究(Matlab代码实现)内容概要:本文围绕“基于数据驱动的Koopman算子的递归神经网络模型线性化”展开,旨在研究纳米定位系统的预测控制问题,并提供完整的Matlab代码实现。文章结合数据驱动方法与Koopman算子理论,利用递归神经网络(RNN)对非线性系统进行建模与线性化处理,从而提升纳米级定位系统的精度与动态响应性能。该方法通过提取系统隐含动态特征,构建近似线性模型,便于后续模型预测控制(MPC)的设计与优化,适用于高精度自动化控制场景。文中还展示了相关实验验证与仿真结果,证明了该方法的有效性和先进性。; 适合人群:具备一定控制理论基础和Matlab编程能力,从事精密控制、智能制造、自动化或相关领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①应用于纳米级精密定位系统(如原子力显微镜、半导体制造设备)中的高性能控制设计;②为非线性系统建模与线性化提供一种结合深度学习与现代控制理论的新思路;③帮助读者掌握Koopman算子、RNN建模与模型预测控制的综合应用。; 阅读建议:建议读者结合提供的Matlab代码逐段理解算法实现流程,重点关注数据预处理、RNN结构设计、Koopman观测矩阵构建及MPC控制器集成等关键环节,并可通过更换实际系统数据进行迁移验证,深化对方法泛化能力的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

技术与健康

你的鼓励将是我最大的创作动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值