-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
499 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* reset */ | ||
html, body, h1, h2, h3, h4, h5, h6, div, ul, li, p, form, label, input, button, img { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
} | ||
|
||
table, th, td, thead, tbody { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
list-style: none; | ||
} | ||
|
||
h1, h2, h3, h4, h5, h6 { | ||
font-size: 100%; | ||
font-weight: normal; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
cursor: pointer; | ||
color: #000; | ||
} | ||
|
||
button { | ||
-ms-box-sizing: content-box; | ||
box-sizing: content-box; | ||
cursor: pointer; | ||
} | ||
|
||
body, input, button { | ||
font: 12px/1.14 'Microsoft YaHei'; | ||
outline: 0; | ||
color: #000; | ||
} | ||
|
||
.clearfix:before,.clearfix:after{ | ||
content:'·'; | ||
height: 0; | ||
display: block; | ||
clear: both; | ||
overflow: hidden; | ||
visibility: hidden; | ||
} | ||
|
||
.clearfix{ | ||
zoom:1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>完整结构</title> | ||
<meta name="keywords" content="" /> | ||
<meta name="description" content="" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<link rel="stylesheet" href="css/style.css" /> | ||
<link rel="shortcut icon" href="img/favicon.ico" /> | ||
<link rel="apple-touch-icon" href="img/touchicon.png" /> | ||
</head> | ||
|
||
<body> | ||
<!-- 头部 --> | ||
<div class="g-hd"> | ||
<!-- LOGO --> | ||
<h1 class="m-logo"><a href="#">LOGO</a></h1> | ||
<!-- /LOGO --> | ||
<!-- 导航 --> | ||
<ul class="m-nav"> | ||
<li><a href="#">NAV1</a></li> | ||
<li><a href="#">NAV2</a></li> | ||
<!-- 更多导航项 --> | ||
</ul> | ||
<!-- /导航 --> | ||
</div> | ||
<!-- /头部 --> | ||
|
||
<!-- 侧栏内容区 --> | ||
<div class="m-side"> | ||
<div class="side"> | ||
<div class="sidein"> | ||
<!-- 热门标签 --> | ||
<div class="sideblk"> | ||
<div class="m-hd3"> | ||
<h3 class="tit">热门标签</h3> | ||
</div> | ||
... | ||
</div> | ||
<!-- 最热TOP5 --> | ||
<div class="sideblk"> | ||
<div class="m-hd3"> | ||
<h3 class="tit">最热TOP5</h3> <a href="#" class="s-fc02 f-fr">更多»</a></div> | ||
... | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- /侧栏内容区 --> | ||
|
||
<!--主要内容--> | ||
<div> | ||
|
||
</div> | ||
<!--/主要内容--> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/*下面是常用的封装好的几个方法*/ | ||
|
||
/*发送请求*/ | ||
function ajax(url, success, fail) { | ||
var xhr = null; | ||
if (window.XMLHttpRequest) { | ||
xhr = new XMLHttpRequest(); | ||
} else { | ||
xhr = new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
xhr.open("GET", url, false); | ||
xhr.onreadystatechange = function () { | ||
if (xhr.readyState == 4) { | ||
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) { | ||
success(xhr.responseText); | ||
} else { | ||
fail(xhr.status); | ||
} | ||
} | ||
} | ||
} | ||
|
||
/*绑定事件*/ | ||
function addEvent(element, type, handler) { | ||
if (element.addEventListener) { | ||
element.addEventListener(type, handler, false); | ||
} else if (element.attachEvent) { | ||
element.attachEvent("on" + type, handler); | ||
} else { | ||
element["on" + type] = handler; | ||
} | ||
} | ||
|
||
/*添加class*/ | ||
function addClass(element, newClass) { | ||
var className = element.className; | ||
if (!className) { | ||
element.className = newClass; | ||
} else { | ||
if (className.indexOf(newClass) === -1) { | ||
className = className + " "; | ||
className += newClass; | ||
element.className = className; | ||
} | ||
} | ||
|
||
} | ||
|
||
/*移除class*/ | ||
function removeClass(element, newClass) { | ||
var className = element.className; | ||
if (className.indexOf(newClass) > -1) { | ||
var reg = new RegExp("\s*" + newClass + "\s*", "gi"); | ||
className = className.replace(reg, " "); | ||
element.className = className; | ||
} | ||
} | ||
|
||
/*查找是否有该class*/ | ||
function hasClass(element, cls) { | ||
var className = element.className; | ||
if (className.indexOf(cls) > -1) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
/*按id获取该元素*/ | ||
function $(id) { | ||
return document.getElementById(id); | ||
} | ||
|
||
/*获取样式*/ | ||
function getStyle(element) { | ||
if (window.getComputedStyle) { | ||
return window.getComputedStyle(element); | ||
} else if (element.currentStyle) { | ||
return element.currentStyle; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>简易网页便筏系统</title> | ||
<meta name="keywords" content=""> | ||
<meta name="description" content=""> | ||
<link rel="stylesheet" href="./style.css" type="text/css"> | ||
</head> | ||
<body> | ||
<button type="button" id="u-btn-create">点我创建便签</button> | ||
<!--<div class="m-note"> | ||
<i class="u-close"></i> | ||
<div class="u-title">便筏01</div> | ||
<div class="u-edit" contenteditable="true"></div> | ||
<div class="u-timeUpdate"> | ||
<span>更新时间:</span> | ||
<span class="time"></span> | ||
</div> | ||
</div>--> | ||
<script src="./index.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.