02 2016 档案

摘要:angularJs没有touch事件.这里提供一个touch指令. ngTouch.js "use strict"; angular.module("ngTouch", []) .directive("ngTouchstart", function () { return { controller: 阅读全文
posted @ 2016-02-25 15:55 思思博士 阅读(5800) 评论(0) 推荐(0) 编辑
摘要:前端我们时常需要封装一些弹出框,这些弹出框大小都不能确定,多半是用js实现居中. 现在有了css3可以不用js了. .box{ background-color: blueviolet; width: 50%; height: 40%; position: absolute; left: 50%; 阅读全文
posted @ 2016-02-18 11:00 思思博士 阅读(271) 评论(0) 推荐(0) 编辑
摘要:一:单行文本出现省略号: .oneLine{ white-space: nowrap; text-overflow: ellipsis; overflow: hidden; width: 100px; line-height: 30px; border: 1px solid red; } <div 阅读全文
posted @ 2016-02-17 14:35 思思博士 阅读(452) 评论(0) 推荐(0) 编辑
摘要:摘抄自:http://www.cnblogs.com/tugenhua0707/p/5180841.html 一. 使用rem作为单位 html { font-size: 100px; } @media(min-width: 320px) { html { font-size: 100px; } } 阅读全文
posted @ 2016-02-04 12:16 思思博士 阅读(630) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="utf-8" /> <title></title> </head> <body> <div ng-controller="CityController"> <select ng-m 阅读全文
posted @ 2016-02-02 20:59 思思博士 阅读(2754) 评论(0) 推荐(0) 编辑
摘要:今天在做手机端发布描述内容时,需要实现换行,还需要有plachholder. 在文本框中换行自然想到了textarea. 问题似乎已经解决了,但是当内容发布后,在html中显示换行都丢失了. 这个时候就用到了contenteditable和placeholder <!--注意这里的div开始和结束标 阅读全文
posted @ 2016-02-02 17:22 思思博士 阅读(1532) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示