node

node

Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。
javascript/jQuery

javascript/jQuery

一种直译式脚本语言,是一种动态类型、弱类型、基于原型的语言,内置支持类型。
MongoDB

MongoDB

MongoDB 是一个基于分布式文件存储的数据库
openstack

openstack

OpenStack是一个由NASA(美国国家航空航天局)和Rackspace合作研发并发起的,以Apache许可证授权的自由软件和开放源代码项目。
VUE

VUE

一套构建用户界面的渐进式框架。与其他重量级框架不同的是,Vue 采用自底向上增量开发的设计。
bootstrap

bootstrap

Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
HTML

HTML

超文本标记语言,标准通用标记语言下的一个应用。
CSS/SASS/SCSS/Less

CSS/SASS/SCSS/Less

层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
PHP

PHP

PHP(外文名:PHP: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域。PHP 独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。用PHP做出的动态页面与其他的编程语言相比,PHP是将程序嵌入到HTML(标准通用标记语言下的一个应用)文档中去执行,执行效率比完全生成HTML标记的CGI要高许多;PHP还可以执
每天进步一点点

每天进步一点点

乌法把门的各累笑寂静
求职招聘

求职招聘

猎头招聘专用栏目
Python

Python

一种解释型、面向对象、动态数据类型的高级程序设计语言。

css居中的几种实现方式

CSS/SASS/SCSS/LESSboloog 发表了文章 • 0 个评论 • 1617 次浏览 • 2017-04-18 18:33 • 来自相关话题

1.?使用padding<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
background-color: pink;
padding: 100px 0;
text-align: center;
}
</style>
</head>
<body>
<div class="wrap">
使用padding让文本垂直居中显示
</div>
</body>
</html>2.?使用绝对定位<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
height: 300px;
line-height: 300px;
text-align: center;
background-color: red;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
margin-left: -150px;
margin-top: -150px;
}
</style>
</head>
<body>
<div class="wrap">
使用绝对定位让.wrap垂直居中显示
</div>
</body>
</html>3.?使用CSS3 transform<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
height: 300px;
line-height: 300px;
text-align: center;
background-color: red;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<div class="wrap">
使用CSS3 transform让 .wrap垂直居中显示
</div>
</body>
</html>4.?使用伪元素<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 400px;
height: 300px;
margin: 0 auto;
background-color: #ccc;
text-align: center;
}
.wrap::before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="wrap">
使用伪元素实现垂直居中
</div>
</body>
</html> 查看全部
1.?使用padding
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
background-color: pink;
padding: 100px 0;
text-align: center;
}
</style>
</head>
<body>
<div class="wrap">
使用padding让文本垂直居中显示
</div>
</body>
</html>
2.?使用绝对定位
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
height: 300px;
line-height: 300px;
text-align: center;
background-color: red;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
margin-left: -150px;
margin-top: -150px;
}
</style>
</head>
<body>
<div class="wrap">
使用绝对定位让.wrap垂直居中显示
</div>
</body>
</html>
3.?使用CSS3 transform
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 300px;
height: 300px;
line-height: 300px;
text-align: center;
background-color: red;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<div class="wrap">
使用CSS3 transform让 .wrap垂直居中显示
</div>
</body>
</html>
4.?使用伪元素
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrap {
width: 400px;
height: 300px;
margin: 0 auto;
background-color: #ccc;
text-align: center;
}
.wrap::before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="wrap">
使用伪元素实现垂直居中
</div>
</body>
</html>

CSS浏览器兼容

回复

CSS/SASS/SCSS/LESSboloog 发起了问题 • 0 人关注 • 0 个回复 • 2806 次浏览 • 2017-04-17 19:10 • 来自相关话题

理解HTML

回复

HTMLboloog 发起了问题 • 2 人关注 • 0 个回复 • 2920 次浏览 • 2017-04-17 18:50 • 来自相关话题

vue-cli打包

VUElopo1983 发表了文章 • 0 个评论 • 1733 次浏览 • 2017-04-15 17:00 • 来自相关话题

1.要是项目直接放网站根目录 直接npm run build2.放到指定目录
? 修改:config/index.jsbuild: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/XXX/', // 项目发布的目录
...
},3.放任意目录
? 修改:config/index.jsbuild: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
...
},4.修改js/css打包名称
build/webpack.prod.conf.js output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[hash].js'),
chunkFilename: utils.assetsPath('js/[id].[hash].js')
},
[name]:名称
[id]:懒加载编号
[hash] 随机码(项目正式上线可删除) new ExtractTextPlugin({
filename: utils.assetsPath('css/[name][hash].css')
}),name:名称
hash 随机码 查看全部
1.要是项目直接放网站根目录 直接
npm run build
2.放到指定目录
? 修改:config/index.js
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/XXX/', // 项目发布的目录
...
},
3.放任意目录
? 修改:config/index.js
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
...
},
4.修改js/css打包名称
build/webpack.prod.conf.js
  output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[hash].js'),
chunkFilename: utils.assetsPath('js/[id].[hash].js')
},
[name]:名称
[id]:懒加载编号
[hash] 随机码(项目正式上线可删除)
    new ExtractTextPlugin({
filename: utils.assetsPath('css/[name][hash].css')
}),
name:名称
hash 随机码

VUE 开发环境搭建

VUElopo1983 发表了文章 • 0 个评论 • 1985 次浏览 • 2017-04-15 16:05 • 来自相关话题

安装Node.js
.......忽略点点 自己百度?
安装淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org 安装vue-cil
cnpm install -g vue-cli 切换到你的项目目录如www
cd www新建vue项目
vue init webpack demo01 一路回车(第4步ESLint 可以一路n,大师请忽略n)
?
进入新建项目
cd demo01 cnpm?install?

npm run dev
?
? 查看全部
安装Node.js
.......忽略点点 自己百度
?
安装淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org 
安装vue-cil
cnpm install -g vue-cli  
切换到你的项目目录如www
cd www
新建vue项目
vue init webpack demo01 
一路回车(第4步ESLint 可以一路n,大师请忽略n)
?
进入新建项目
cd demo01 
cnpm?install?

npm run dev

?
?

vue 滚动到底部

VUElopo1983 发表了文章 • 0 个评论 • 3091 次浏览 • 2017-04-13 03:04 • 来自相关话题

template<div class="mix" ref="chatbox">....</div>
datadata() {
return {
userMsg:
}
}
?
?
methodsgoBottom(e) {
e.scrollTop = e.scrollHeight
}mounted(如果需要进入就滚动)mounted: function() {
this.$nextTick(function() {
let e = this.$refs.chatbox;
this.goBottom(e);
})
}
watch(如果响应)watch: {
userMsg() {
this.$nextTick(() => {
let e = this.$refs.chatbox;
this.goBottom(e);
})
}
}?
?
<-------------------------------------------------邪恶分割线------------------------------------------------>
?
?
以上的代码完全可忽略 因为出现了 邪恶分割线
?
CSS3 FLEX 布局解决display: flex;
flex-flow: column-reverse;
align-items: baseline; 查看全部
template
<div class="mix" ref="chatbox">....</div>

data
data() {
return {
userMsg:
}
}

?
?
methods
goBottom(e) {
e.scrollTop = e.scrollHeight
}
mounted(如果需要进入就滚动)
mounted: function() {
this.$nextTick(function() {
let e = this.$refs.chatbox;
this.goBottom(e);
})
}

watch(如果响应)
watch: {
userMsg() {
this.$nextTick(() => {
let e = this.$refs.chatbox;
this.goBottom(e);
})
}
}
?
?
<-------------------------------------------------邪恶分割线------------------------------------------------>
?
?
以上的代码完全可忽略 因为出现了 邪恶分割线
?
CSS3 FLEX 布局解决
display: flex;
flex-flow: column-reverse;
align-items: baseline;

vue multiple type="file" 多文件上传

VUElopo1983 发表了文章 • 0 个评论 • 2842 次浏览 • 2017-04-13 02:56 • 来自相关话题

template<input class="hide" multiple type="file" name="fileup" id="upfile" accept="application/x-zip-compressed" value="" @change="onFileChange" multiple="multiple" />
<label class="btn btn-default" for="upfile">选择文件</label>?
methodsonFileChange(e) {
const files = e.target.files || e.dataTransfer.files;
let a =
Array.from(files, item => {
a.push({
name: item.name,
type: item.name.split('.')[1]
})
});
this.arrfile = a;
}
发送(使用axios FormData)addChat(oid, def) {
let data = new FormData(def);
data.append('uid', window.USER_ID);
data.append('oid', oid);
data.append('guest',true)
return fetch('chat', data);
}sendChat() {
let def = this.$refs.chatform;
api.addChat(this.getOid, def).then(response => {
if(!!response) {
this.getChat()
} else {
alert("非法操作")
}
}), response => {
this.loading = false;
this.errorinfo = "加载失败....服务器出小差了"
}
}
? 查看全部
template
<input class="hide" multiple type="file" name="fileup" id="upfile" accept="application/x-zip-compressed" value="" @change="onFileChange" multiple="multiple" />
<label class="btn btn-default" for="upfile">选择文件</label>
?
methods
onFileChange(e) {
const files = e.target.files || e.dataTransfer.files;
let a =
Array.from(files, item => {
a.push({
name: item.name,
type: item.name.split('.')[1]
})
});
this.arrfile = a;
}

发送(使用axios FormData)
addChat(oid, def) {
let data = new FormData(def);
data.append('uid', window.USER_ID);
data.append('oid', oid);
data.append('guest',true)
return fetch('chat', data);
}
sendChat() {
let def = this.$refs.chatform;
api.addChat(this.getOid, def).then(response => {
if(!!response) {
this.getChat()
} else {
alert("非法操作")
}
}), response => {
this.loading = false;
this.errorinfo = "加载失败....服务器出小差了"
}
}

?

子元素点击靠前(jq dom操作)

javascript/jQuerylopo1983 发表了文章 • 0 个评论 • 1356 次浏览 • 2017-03-29 11:08 • 来自相关话题

$("li").click(function() {$(this).insertBefore($(this).siblings().first());});
<ul>
<li>div1</li>
<li>div2</li>
<li>div3</li>
</ul> 查看全部
$("li").click(function() {$(this).insertBefore($(this).siblings().first());});
		<ul>
<li>div1</li>
<li>div2</li>
<li>div3</li>
</ul>

又丢刀了 关于bootstrap2.3.2 dropdown 移动端下无法使用的问题

bootstrap2.xlopo1983 发表了文章 • 0 个评论 • 1649 次浏览 • 2017-03-08 00:53 • 来自相关话题

几天公司一同事女朋友到新公司上班 公司要求用bootstrap2.3.2 构筑页面(可满足IE8的最大兼容 这无可厚非 虽然bs 官网一直推荐 用最新版的3.x 国内的话 呵呵 其实2.3.2 才是最适合的),期间遇到navbar 的问题 蛮以为页头 版本 jq 之类的问题 草率回答之结果 均告知无法实现dropdown 跳转。。。。。。。。。。
?
晚上自己链接了 很久没用的2.x 一看满以为 是他女朋友犯了常识性错误 结果并不然?
我尝试切换jq 版本从1.7.3 到1.11.1 结果还是一样 what a fu*k!
?
baidu 用中文搜索知道逼逼 ?唉还是打开大蓝灯 e文吧
果不其然 这尼玛居然是bs2.3.2的bug 建议使用3.0.0 日你dog了
?
从源头开始找问题 点击后不跳转?
1.a 为blcok 状态 不存在点不了的问题 ?所以a 没问题
2.qie切换到模拟模式 ios what a fu*k 点不了?
? 祭出chrome F12 大bao宝剑 一看 马丹




这是什么鬼 来来 马丹还z-index 990 ?改改改 position:static;? .dropdown-backdrop {
position: static;
}哎哟 我了个********** 查看全部
几天公司一同事女朋友到新公司上班 公司要求用bootstrap2.3.2 构筑页面(可满足IE8的最大兼容 这无可厚非 虽然bs 官网一直推荐 用最新版的3.x 国内的话 呵呵 其实2.3.2 才是最适合的),期间遇到navbar 的问题 蛮以为页头 版本 jq 之类的问题 草率回答之结果 均告知无法实现dropdown 跳转。。。。。。。。。。
?
晚上自己链接了 很久没用的2.x 一看满以为 是他女朋友犯了常识性错误 结果并不然?
我尝试切换jq 版本从1.7.3 到1.11.1 结果还是一样 what a fu*k!
?
baidu 用中文搜索知道逼逼 ?唉还是打开大蓝灯 e文吧
果不其然 这尼玛居然是bs2.3.2的bug 建议使用3.0.0 日你dog了
?
从源头开始找问题 点击后不跳转?
1.a 为blcok 状态 不存在点不了的问题 ?所以a 没问题
2.qie切换到模拟模式 ios what a fu*k 点不了?
? 祭出chrome F12 大bao宝剑 一看 马丹
QQ图片20170308004423.png

这是什么鬼 来来 马丹还z-index 990 ?改改改 position:static;?
			.dropdown-backdrop {
position: static;
}
哎哟 我了个**********

求一个较全的三级联动

回复

javascript/jQueryJerry24 发起了问题 • 1 人关注 • 0 个回复 • 1938 次浏览 • 2017-03-03 17:10 • 来自相关话题