前端页⾯后台管理模板—代码实例
今天分享下”前端页⾯后台管理模板“这篇⽂章,⽂中根据实例编码详细介绍,或许对⼤家的编程之路有着⼀定的参考空间与使⽤价值,需要的朋友接下来跟着云南仟龙Mark⼀起学习⼀下吧。近期⾃⾝需要⼀套管理后台的模版,随后去⽹络上搜索,模版确实许多,可是合适我的并不是很多。我需要的模版是不可能⾮常⼤,我可以操纵代码,款式不必太古⾊古⾹,最好是有点⼉CSS3的实际效果。最终总算寻⼀张⾸页,随后再依据这⼀⾸页来编写别的的后台管理⼀部分。第⼀眼见到这⼀款式,就特别令⼈满意。如今只⼲了四张⽹页页⾯,登陆、主页、菜单栏管理⽅法和菜单栏加上⽹页页⾯。
电脑浏览器兼容是尽可能保证IE8之上能够应⽤,firefox、chrome浏览器等能彻底兼容。因为IE8没法分析CSS3,因此很多地区会超额的制做CSS。下边的代码都没有完全的代码,详细代码能够参照下载的demo。
前端页⾯后台管理模板—代码实例_html
⼀、页⾯⼤量使⽤了HTML5与CSS3
⾃⼰对于html5的理解⼀直很肤浅,缺少想象⼒,这次通过这个模版页⾯可以更多的了解到这些标签在什么场合下⽐较适合⽤。很多地⽅也⽤到了选择器,拓宽了⾃⼰的眼见。左边栏的⼩图标原先是⽤img展⽰
的,现在都被我换成了icon字体了,直接通过icomoon⽹站在线获取,使⽤icon字体将很容易控制样式以及⼤⼩。
<header >
<hgroup>
<h1 ><a href="index.html">Website Admin</a></h1>
<h2 >Dashboard</h2><div ><a href="wwwblogs/strick/">View Site</a></div>
</hgroup>
</header>
.quick_search input[type=text] {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
border: 1px solid #bbb;
height: 26px;
width: 90%;
color: #ccc;
-webkit-box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff;
-moz-box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff;
box-shadow: inset 0 2px 2px #ccc, 0 1px 0 #fff;
text-indent: 30px;
background: #fff url(../images/icn_search.png) no-repeat;
background-position: 10px 6px;
}
⼆、宽度使⽤%⽐,复⽤更⽅便
这套模版全部是⽤%设置宽度,这次我也感受到了这种设置⽅式的便捷。模版只提供了⾸页,登录页⾯是后⾯⾃⼰加的。这个部分就是⾃⼰在最外层定义了⼀个宽度,⾥⾯的根据百分⽐显⽰,完全没有⾛样,也不⽤修改代码。
前端页⾯后台管理模板—代码实例_html_02
<div >
<section  >
<article >
<header><h3>登录</h3></header>
</article>
</section>
</div>
只是简单的加了个<div >就完成了⼀个页⾯布局。
三、通⽤美观的提⽰
这个提⽰直接复制就可以,代码很简洁,样式看着就是很舒服。
前端页⾯后台管理模板—代码实例_html_03
前端页⾯后台管理模板—代码实例_html_04
<h4 >Welcome to the free MediaLoot admin panel template, this could be an informative message.</h4>
<h4 >A Warning Alert</h4>
<h4 >An Error Message</h4>
<h4 >A Success Message</h4>
1.
2.
3.
4.
四、通⽤table样式
后来展⽰列表信息,⽤table⽐较⽅便,宽度也是⽤%⽐展⽰,复制到各个页⾯能够很和谐的融⼊进去。⽤icon来展⽰操作,也很清晰。
前端页⾯后台管理模板—代码实例_html_05
五、CSS3按钮
⼀直就想试试⽤CSS3来制作按钮特效了,这次终于有机会啦,在⽹上了⼀套,⾃⼰做了些细微修改,并做了浏览器的兼容。
前端页⾯后台管理模板—代码实例_html_06
效果的确不错,但是CSS的代码⼀下⼦就增加了好多,⽽且为了能让IE8这些不兼容CSS3的浏览器能达到差不多的效果,还额外写了点CSS,通过JS插件modernizr辅助。
a.button {
display:inline-block;
position: relative;
height: 25px;
width: 80px;
margin: 0 10px 18px 0;
text-decoration: none;
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: bold;
line-height: 25px;
text-align: center;
-
webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
a.button:before,
a.button:after {
content: ‘’;
position: absolute;
left: -1px;
height: 25px;
width: 80px;
bottom: -1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
论坛前端模板
a.button:before {
height: 23px;
bottom: -4px;
border-top: 0;
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
-webkit-box-shadow: 0 1px 1px 0px #bfbfbf;
-moz-box-shadow: 0 1px 1px 0px #bfbfbf;
box-shadow: 0 1px 1px 0px #bfbfbf;
}
/* MODERNIZR FALLBACK */
.no-cssgradients a.button, .no-cssgradients a.button:visited,
.no-borderradius a.button, .no-borderradius a.button:visited,
.no-generatedcontent a.button, .no-generatedcontent a.button:visited {
background: url(…/images/img_btn.png) no-repeat 0 0px;
height: 32px;
width: 82px;
}
六、CSS3分页
这个也是后⾯⾃⼰添加上去的,挺融⼊这个风格中的,在⾥⾯也加了些CSS3的元素
前端页⾯后台管理模板—代码实例_html_07
ul.paginationA01 li a:hover,
ul.paginationA01 li a.current
{
background:#FFFFFF;
}
ul.paginationA01 li a:active{
background:#D9D9D9;
background:-moz-linear-gradient(top,#FFFFFF 1px,#EAEAEA 1px,#b6b6b6);
background:-webkit-gradient(linear,0 0,0 100%,color-stop(0.02,#FFFFFF),color-stop(0.02,#EAEAEA),color-stop(1,#b6b6b6));
}
七、单元测试的模块
在tests⽂件夹下⾯,我已经添加好单元测试的模块,能够让⾃⼰以后的JS脚本代码更加的健壮。
前端页⾯后台管理模板—代码实例_html_08
通过上⾯的⼏个分解模块,基本上可以满⾜后台管理各个部分的样式需求,⾃⼰也可以有⼀套能修改的管理模版啦!
今天的⽂章就分享到这啦,内容转⾃divcss5平台,下篇⽂章再见!

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。