m_Orchestrate learning system---十七、页面美观的关键是什么

一、总结

一句话总结:图片用好看的

1、项目板块化?

就是一个个模块,能复用的话很快的

页面由这一个个模块拼装而成

2、通过jquery添加class方法来实现使导航栏出现的效果?

 1 <script>
2 $(function(){
3
4 // 动态计算列表文字样式
5 auto_resize();
6 $(window).resize(function() {
7 auto_resize();
8 });
9 $('.am-list-thumb img').load(function(){
10 auto_resize();
11 });
12
13 $('.am-list > li:last-child').css('border','none');
14 function auto_resize(){
15 $('.pet_list_one_nr').height($('.pet_list_one_img').height());
16
17 }
18 $('.pet_nav_gengduo').on('click',function(){
19 $('.pet_more_list').addClass('pet_more_list_show');
20 });
21 $('.pet_head_gd_ico').on('click',function(){
22 $('.pet_more_list').addClass('pet_more_list_show');
23 });
24 $('.pet_more_close').on('click',function(){
25 $('.pet_more_list').removeClass('pet_more_list_show');
26 });
27 });
28
29 </script>

3、页面内跳转?

<div data-am-widget="gotop" class="am-gotop am-gotop-fixed">
<a href="#top" title=""> <img class="am-gotop-icon-custom"
src="__STUDENT__/img/goTop.png" />
</a>
</div> <div class="pet_mian" id="top">

与目标处直接用id定义位置,跳转处在a标签的href属性中用#访问id即可

4、关于session和cookie?

1、在index(前台)模块登录成功的时候记录cookie和session

if($res){
//5、登录成功,将数据存入cookie和session
//5.1、将登录信息写入session
session('id', $res['id']);
session('username', $res['username']);
session('password', $res['password']);
//5.2、设置cookie
cookie('id', $res['id'], 3600);
cookie('username', $res['username'], 3600);
cookie('password', $res['password'], 3600);
if($data['status']) $this->success("即将跳转到老师界面!!",url('teacher/index/index'));
else $this->success("即将跳转到学生界面!!",url('student/index/index'));
}

2、其它用到cookie和session的位置

页面 {$Request.session.username}

控制器 session('username')

3、权限验证(Base控制器)中需要来判断系统中是否有cookie和session来确定是否已经登录了系统

public function _initialize()
{
if(!session('username')){
//如果cookie存在的话
if(cookie('username')){
//设置session
session('id', cookie('id'));
session('username',cookie('username'));
session('password', cookie('password'));
// dump(cookie('username'));die;
return;
}
$this->error('您尚未登录系统',url('index/login/login'));
}
}

4、退出登录时销毁cookie和session中的数据

public function logout(){
session(null);
cookie('id', null);
cookie('username', null);
cookie('password', null);
//退出登录清空session之后要成功跳转
$this->success('退出系统成功',url('index/index/index'));
}

5、mysql解决设置默认值不显示问题(它不是为空么,你不让它为空就好)?

已有test表,表中有个case_status字段,现在给该字段设置默认值为A:

ALTER TABLE test ALTER COLUMN case_status SET DEFAULT 'A';
在定义表的时候设置字段的default就可以了,比如:
ALTER TABLE tb1
CHANGE `type` `type` INT DEFAULT 0 NOT NULL

6、页面板块信息非常清楚,添加板块,删除板块啥的非常轻松?

比如说在个人信息和底部之间添加推荐板块,非常方便,而且丝毫丝毫不影响界面

添加板块啥的非常清楚

7、添加的板块用div容器包起来(结构清晰)?

比如说这里的修改个人信息

<div><a href="" class="am-fr am-btn am-btn-primary am-round" style="margin: 10px;">修改个人信息</a></div>

或者别的添加的板块,都用div包起来,这样结构异常清晰

8、论页面图片对页面美观的影响力?

二、内容在总结中

m_Orchestrate learning system---十七、页面美观的关键是什么的更多相关文章

  1. m_Orchestrate learning system---二十七、修改时如何快速找到作用位置

    m_Orchestrate learning system---二十七.修改时如何快速找到作用位置 一.总结 一句话总结:找人,找起作用的位置真的重要,找到就事半功倍了 加载页面的时候观察在f12的e ...

  2. m_Orchestrate learning system---九、在无法保证是否有图片的情况下,如何保证页面格式

    m_Orchestrate learning system---九.在无法保证是否有图片的情况下,如何保证页面格式 一.总结 一句话总结:都配上默认缩略图就可以解决了 1.如何获取页面get方式传过来 ...

  3. m_Orchestrate learning system---二十五、复制类的时候最容易出现的错误是什么

    m_Orchestrate learning system---二十五.复制类的时候最容易出现的错误是什么 一.总结 一句话总结:命名空间错误导致Analyze类虽然继承了Base类,但是没有执行里面 ...

  4. Machine Learning - 第6周(Advice for Applying Machine Learning、Machine Learning System Design)

    In Week 6, you will be learning about systematically improving your learning algorithm. The videos f ...

  5. m_Orchestrate learning system---mo系统权限思考

    m_Orchestrate learning system---mo系统权限思考 一.总结 一句话总结:注意不同身份访问同一客户端时候的权限,比如面板显示,比如功能按钮 权限 面板 功能 1.小组之间 ...

  6. m_Orchestrate learning system---三十五、php数据和js数据的解耦:php数据(php代码)不要放到js代码中

    m_Orchestrate learning system---三十五.php数据和js数据的解耦:php数据(php代码)不要放到js代码中 一.总结 一句话总结:也就是以html为中介,用html ...

  7. m_Orchestrate learning system---三十四、使用重定义了$的插件的时候最容易出现的问题是什么

    m_Orchestrate learning system---三十四.使用重定义了$的插件的时候最容易出现的问题是什么 一.总结 一句话总结:如下面这段代码,定义了$的值,还是会习惯性的把$当成jQ ...

  8. m_Orchestrate learning system---三十三、公共变量多弄成全局变量

    m_Orchestrate learning system---三十三.公共变量多弄成全局变量 一.总结 一句话总结:比如班级id,小组id,这样省事,而且减少数据库的访问,加快访问速度,而且节约代码 ...

  9. m_Orchestrate learning system---三十二、数据库字段判断为空时容易出现问题,如何从根本上解决这个问题

    m_Orchestrate learning system---三十二.数据库字段判断为空时容易出现问题,如何从根本上解决这个问题 一.总结 一句话总结:字段禁止为空,设置默认值0即可 禁止 空 默认 ...

随机推荐

  1. gdbserver 远程调试问题:设置文件和so搜索路径

    编写一个必定crash 的程序 #include <stdio.h> void crash(){ char *a=0; *a=0; } int main() { printf(" ...

  2. C9---include,编译

    //main.c //include基本概念 //include是预处理指令,翻译之前会替换,编译之前左的处理,#都是预处理指令,翻译时候会添加别的内容进来. #include <stdio.h ...

  3. java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")

    转自:https://blog.csdn.net/bluecard2008/article/details/80921682?utm_source=blogxgwz0 摘要: 今天在使用jetty做容 ...

  4. Asp.Net Core部署到Linux服务器

    从2016年7月, .NET Core1.0 正式发布开始,由于时间问题,我没怎么关注过.NET Core,最近刚抽出点时间研究了下,先讲下如何把ASP.NET Core部署到Linux上吧.这里我用 ...

  5. Tomcat配置自签名https

    从JDK中找到keytool.exe,随便复制到一个方便的目录,在命令行中进入这个目录. 第一步:为服务器生成证书 tomcat.keystore,命令中如果是IP方式访问用-ext SAN=ip:1 ...

  6. 跟着8张思维导图学习javascript (转)

    学习的道路就是要不断的总结归纳,好记性不如烂笔头,so,下面将po出8张javascript相关的思维导图. 思维导图小tips:思维导图又叫心智图,是表达发射性思维的有效的图形思维工具 ,它简单却又 ...

  7. 第一章 关于python

    Python简介 Python是什么?   python的创始人为吉多·范罗苏姆(Guido van Rossum).  “Python is a great object-oriented, int ...

  8. java开发移动端之spring的restful风格定义

    https://www.ibm.com/developerworks/cn/web/wa-spring3webserv/index.html

  9. 路飞学城Python-Day24(practise)

    本章总结 练习题 什么是C/S架构? C指的是client(客户端软件),S指的是Server(服务端软件)

  10. 路飞学城Python-Day23

    1.计算机基础 Python可以实现各种应用软件,类比word.QQ.爱奇艺等,但是应用这些软件需要计算机硬件, 计算机发展的过程就是人类不断的希望机器去取代人力,解放更多的人力,最终极的理想就是完全 ...