摘要: import React from 'react';var audioCtx = new (window.AudioContext || window.webkitAudioContext)();var voiceSelect = document.getElementById("voice");v 阅读全文
posted @ 2018-09-04 13:35 web倩倩 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 很多时候我们需要把一个元素在其父级容器里水平、垂直居中对齐。以下我列出了常用的几种方法:1、在知道子元素宽度与高度的情况下进行居中,采用位置定位:absolute + margin 2、在不知道子元素高与宽的情况下,采用位置定位:absolute + transform 3、采用 flexbox 进 阅读全文
posted @ 2016-09-20 14:20 web倩倩 阅读(211) 评论(0) 推荐(0) 编辑
摘要: $('#add_img').on('change', function(){ var objUrl = getObjectURL(this.files[0]) ; if (objUrl) { $(this).prev("img").attr("src", objUrl); } }); functio 阅读全文
posted @ 2016-09-09 14:43 web倩倩 阅读(935) 评论(0) 推荐(0) 编辑
摘要: min-height: 4rem; margin-top: -1px; background: -webkit-gradient(linear,left top,left bottom,from(#fff),color-stop(.5,#fff),color-stop(.5,transparent) 阅读全文
posted @ 2016-09-09 14:42 web倩倩 阅读(880) 评论(0) 推荐(0) 编辑
摘要: <img lowsrc="" src="" width="300" height="200" border="0" /> 把分辨率低的图片放在lowsrc里面,清晰图片放在src里面 阅读全文
posted @ 2016-08-12 14:37 web倩倩 阅读(1559) 评论(0) 推荐(0) 编辑
摘要: 刚刚接触react 可能写的地方有错误或者不完善的地方欢迎大家给指正 下面开始正题 首先分析页面基于react的特性--把页面中所有显示内容看做模块加载 页面分析完成开始准备 基于jspm工具首先安装jspm 在终端 npm init 然后安装jspm npm install jspm --save 阅读全文
posted @ 2016-07-29 15:41 web倩倩 阅读(5026) 评论(1) 推荐(0) 编辑
摘要: div{ position:fixed; width:1200px; margin:0 auto; top:0; bottom:0; left:0; right:0; } 阅读全文
posted @ 2016-07-28 17:27 web倩倩 阅读(2499) 评论(0) 推荐(0) 编辑
摘要: 话不说直接上正题。 环境搭建 Babel6版本开始已经不支持使用npm install babel -g 安装了,它分成了几个部分 babel cli,适用于命令行 babel-core,包含node api babel需要手动安装插件 然后在命令行输入vim .babelrc在文件夹下面创建一个叫 阅读全文
posted @ 2016-07-06 11:36 web倩倩 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 方案一 方案二 阅读全文
posted @ 2016-07-01 12:45 web倩倩 阅读(629) 评论(0) 推荐(0) 编辑
摘要: <script>$(function(){$('input').click(function(){if(!$('#note').is(':visible')){$('#note').css({display:'block', top:'-100px'}).animate({top: '+100'}, 阅读全文
posted @ 2016-03-25 16:29 web倩倩 阅读(534) 评论(0) 推荐(0) 编辑