class

BootStrap布局案例

此生再无相见时 提交于 2020-02-19 07:43:17
BootStrap 布局 bootstrap 2.3版与3.0版的使用区别 http://www.weste.net/2013/8-20/93261.html 以一个博客系统的首页,来介绍如何布局 1 ,纸上画出你的布局草图 (1), 先大致勾勒出 Header , Content, Right , Footer 吧 , 标出它们各自的宽高比例 (2)Header 里面得有 Navgation, Search , Barler 这些东东吧 , Footer 里面总要有 CorpRight 吧 (3)Righter 应该有个 NewList, 简单介绍, (4)剩下就是 Content 了,你要放主要的内容了 Header 部分 Height:157px Footer 部分 Height:46px Content 部分 Width :1002px Right 部分 Width: 308px 1, 先引用文件 <link href="css/bootstrap.min.css" rel="stylesheet" /> <link href="css/bootstrap-responsive.min.css" rel="stylesheet" /> <link href="css/custom.css" rel="stylesheet" /> 2, 自定义样式文件 Customer

classList

烂漫一生 提交于 2020-02-18 07:09:07
新H5中DOM对象多了一个classList属性,是一个数组 add 添加一个新的类名 remove 删除一个的类名 contains 判断是否包含一个指定的类名 toggle 切换一个class element.toggle('class-name',[add_or_remove]) toggle 函数的第二个参数true为添加 false删除 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>class-list</title> <link rel="stylesheet" href="bootstrap.min.css"/> </head> <body> <header class="container"> <h1 class="page-header">Element.classList</h1> </header> <div class="container"> <nav class="navbar navbar-default"> <a href="#" class="navbar-brand">Itcast</a> <ul class="nav navbar-nav"> <li><a href="#">Home</a></li> <li><a href="#">Contact<

Python calling method without 'self'

喜你入骨 提交于 2020-02-18 05:41:49
问题 So I just started programming in python and I don't understand the whole reasoning behind 'self'. I understand that it is used almost like a global variable, so that data can be passed between different methods in the class. I don't understand why you need to use it when your calling another method in the same class. If I am already in that class, why do I have to tell it?? example, if I have: Why do I need self.thing()? class bla: def hello(self): self.thing() def thing(self): print "hello"

Difference between classical inheritance and prototype inheritance

一个人想着一个人 提交于 2020-02-18 05:16:19
问题 I found this definition here : https://medium.com/javascript-scene/10-interview-questions-every-javascript-developer-should-know-6fa6bdf5ad95#.y0nc8kx34 Doesn't it sound awkward to you ? Does this definition make sense ? For me in both case there is a use of a constructor (with new you can override the returned object that's all) and in both case there is a prototype inheritance. Am I missing something or the definition above is not really accurate ? *3. What is the difference between

Difference between classical inheritance and prototype inheritance

亡梦爱人 提交于 2020-02-18 05:16:05
问题 I found this definition here : https://medium.com/javascript-scene/10-interview-questions-every-javascript-developer-should-know-6fa6bdf5ad95#.y0nc8kx34 Doesn't it sound awkward to you ? Does this definition make sense ? For me in both case there is a use of a constructor (with new you can override the returned object that's all) and in both case there is a prototype inheritance. Am I missing something or the definition above is not really accurate ? *3. What is the difference between

bootstrap卡片

梦想与她 提交于 2020-02-16 11:56:16
卡片一种可伸缩可扩展的容器 ##卡片的设置 div.card 容器 (div.card指 div 容器加上class 下面文章不在声明) div.card-body 容器 父级是.card h*.card-title 卡片标签 可放在.card也可以放cark-body中 (h* 指 h1-h7) <div class="card"> <div class="cark-body">简单的卡片</div> </div> ##card卡片 卡片是flex布局因此容易对齐和控制 下面是bootstrap对.cark 的设置 .card { position: relative; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: #fff; background-clip: border-box; border: 1px solid rgba(0, 0, 0, 0.125); border-radius: 0.25rem; } 当需要往卡片中 填充可以使用 .card-body .card-body { -ms-flex: 1 1 auto; flex:

How do I use variables declared in one method, in another method.

痴心易碎 提交于 2020-02-16 05:48:10
问题 So I have a method that looks like this: public Maze(String[] textmaze, int startRow, int startCol, int finishRow, int finishCol){ int numRows = textmaze.length; int numCols = textmaze[0].length; int [][] x = new int[numRows][numCols]; } So I want to use the variables x, numRows and numCols in other methods however numRows and numCols needs the String textmaze which must be passed in as a parameter and the main method where this method is called is in another class which I'm not allowed to

php class中public,private,protected的区别,以及实例

陌路散爱 提交于 2020-02-16 04:19:49
一,public,private,protected的区别 public:权限是最大的,可以内部调用,实例调用等。 protected: 受保护类型,用于本类和继承类调用。 private: 私有类型,只有在本类中使用。 二,实例 <?php error_reporting(E_ALL); class test{ public $public; private $private; protected $protected; static $instance; public function __construct(){ $this->public = 'public <br>'; $this->private = 'private <br>'; $this->protected = 'protected <br>'; } static function tank(){ if (!isset(self::$instance[get_class()])) { $c = get_class(); self::$instance = new $c; } return self::$instance; } public function pub_function() { echo "you request public function<br>"; echo $this->public;

对“通用分页类”的测试

妖精的绣舞 提交于 2020-02-16 03:33:40
为了方便,我把分页类的完整代码贴出了,另外再贴个测试的代码。 分页类代码: 1 2 <!-- 3 类名:php通用分页类 4 版本: 2.0 5 功能:实现php中常用的页面分页,提供图像文字分页链接、图像分页链接。文字链接时,可自定义链接文字,图像链接时,可自定义图片。并且两种方式都可自定义样式。 6 作者:KnowMore 7 邮箱:hkmgjsf@yahoo . com . cn 8 电话: 15976526525 9 时间: 2007.5 . 10 10 附注:如发现Bug,麻烦告知一声,以便能及时纠正,谢谢!可自由转载,但请注明作者、出处。 11 --> 12 13 <? 14 class page 15 { 16 var $all_count , $cur_page , $sql , $conn , $page_size , $all_page , $cur_url , $page_num ; 17 18 function page( $conn ) // 构造函数 19 { 20 $this -> conn = $conn ; // 数据库连接 21 } 22 23 function init() // 初始化函数 24 { 25 $this -> get_count(); // 获取总纪录数 26 $this -> get_curpage(); // 获取当前页数

黑马旅游网前端页面Bootstrap案例

给你一囗甜甜゛ 提交于 2020-02-16 01:14:28
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --> <title>Bootstrap 101 Template</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <script src="js/jquery-3.2.1.min.js"></script> <script src="js/bootstrap.min.js"></script> <![endif]--> <style> .paddtop{ padding-top: 10px; } .jx{ border-bottom: 2px solid #ffc900; padding: 5px; } .company{ height: 40px; background-color: #ffc900; text-align: center; line