-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1 lines (1 loc) · 7.34 KB
/
index.html
1
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta name="X-UA-Compatible" content="IE=edge"><title> wah's life</title><meta name="description" content="web前端 html5 css3 javascript es6 egret vue"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/favicon.ico"><link rel="stylesheet" href="/css/apollo.css"><link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css"><script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script><link rel="search" type="application/opensearchdescription+xml" href="http://shiwah.me/atom.xml" title="wah's life"></head><body><div class="wrap"><header><a href="/" class="logo-link"><img src="/author.jpg" alt="logo"></a><ul class="nav nav-list"><li class="nav-list-item"><a href="/" target="_self" class="nav-list-link active">BLOG</a></li><li class="nav-list-item"><a href="/about/" target="_self" class="nav-list-link">ABOUT</a></li><li class="nav-list-item"><a href="http://weibo.com/shihuacivis" target="_blank" class="nav-list-link">WEIBO</a></li><li class="nav-list-item"><a href="https://github.com/shihuacivis" target="_blank" class="nav-list-link">GITHUB</a></li></ul></header><main class="container"><ul class="home post-list"><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/11/29/20171129_contentEditable/" class="post-title-link">使用execCommand将文字样式设置成css样式的办法</a></h2><div class="post-info">Nov 29, 2017</div><div class="post-content"><p>我们在使用<code>contenteditable</code>属性做富文本编辑器时经常会用到<code>document.execCommand</code>方法来处理文字的样式。但当我们要设置比如<code>font-size</code>,会发现这个命令只支持(1-7)这几种字体大小值,而不是我们想要的类似css样式的值<a href="https://developer.mozilla.org/zh-CN/docs/Web/API/Document/execCommand" target="_blank" rel="external">详细文档</a>。有此类问题的样式还包括行高、颜色等到。但实际上我们的需求可能是将其设置成css样式,那就可以使用下面的方法来实现。</p></div><a href="/2017/11/29/20171129_contentEditable/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/08/24/20170824_eventTarget/" class="post-title-link">获取TouchEvent准确的Target</a></h2><div class="post-info">Aug 24, 2017</div><div class="post-content"><p>细心朋友可能已经发现了,我们在处理<code>touchmove</code>、<code>touchend</code>事件时,通过<code>event.target</code>属性获取的永远等于<code>touchstart</code>起始触发的元素。<br>也就是说当我们从A元素开始触屏,即使我们现在划到B元素上,<code>event.target</code>返回的还是A。<br>这个表现与<code>mousemove</code>事件的表现不一致。<br>可以通过下列方法获得事件真实的target。</p></div><a href="/2017/08/24/20170824_eventTarget/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/08/09/20170809_oldthings/" class="post-title-link">javascript拾遗</a></h2><div class="post-info">Aug 9, 2017</div><div class="post-content"><p>将过去零零散散的问题收集记录于此</p></div><a href="/2017/08/09/20170809_oldthings/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/08/09/20170809_msgpack/" class="post-title-link">MessagePack在浏览器端的应用</a></h2><div class="post-info">Aug 9, 2017</div><div class="post-content"></div><a href="/2017/08/09/20170809_msgpack/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/06/03/20170603_mobileWeb/" class="post-title-link">移动端开发玄学研究分析</a></h2><div class="post-info">Jun 3, 2017</div><div class="post-content"><p>移动端领域玄学集合</p></div><a href="/2017/06/03/20170603_mobileWeb/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2017/03/19/20170319_domSizePos/" class="post-title-link">DOM元素的尺寸和位置</a></h2><div class="post-info">Mar 19, 2017</div><div class="post-content"><p><code>box-sizing</code> 、<code>offsetWidth</code>、<code>clientWidth</code>、<code>clientLeft</code><br></div><a href="/2017/03/19/20170319_domSizePos/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2016/09/29/20160929_tsSubPub/" class="post-title-link">Typescript中实现观察者模式的事件管理器</a></h2><div class="post-info">Sep 29, 2016</div><div class="post-content"><p>观察者模式的事件管理器可以让游戏中各模块间的功能调用以事件响应的方式相对独立开来,使得各模块间的功能相对更加独立。TS中的实现方法与JS类似,只是某些语法略有不同。<br></div><a href="/2016/09/29/20160929_tsSubPub/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2015/12/29/20151229_aes/" class="post-title-link">js在浏览器端对二进制流进行AES加密和解密</a></h2><div class="post-info">Dec 29, 2015</div><div class="post-content"><p>最近有一个项目,需要前端通过websocket与服务端连接,服务端直接向前端发二进制的数据协议包,但是这个协议包的内容是经过AES加密的,需要前端来在直接解密二进制流。</p></div><a href="/2015/12/29/20151229_aes/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2015/12/29/20151229_arrayBuffer/" class="post-title-link">TypeArray、ArrayBuffer、Blob的相互转换</a></h2><div class="post-info">Dec 29, 2015</div><div class="post-content"></div><a href="/2015/12/29/20151229_arrayBuffer/" class="read-more">...more</a></article></li><li class="post-list-item"><article class="post-block"><h2 class="post-title"><a href="/2015/11/18/20150918_codeBeter/" class="post-title-link">js代码优化的思考</a></h2><div class="post-info">Nov 18, 2015</div><div class="post-content"><p>变量抽取 策略模式 相关</p></div><a href="/2015/11/18/20150918_codeBeter/" class="read-more">...more</a></article></li></ul></main><footer><div class="paginator"><a href="/page/2/" class="next">NEXT</a></div><div class="copyright"><p>© 2015 - 2017 <a href="http://shiwah.me">石华</a>, powered by <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/pinggod/hexo-theme-apollo" target="_blank">hexo-theme-apollo</a>.</p></div></footer></div><script async src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML" integrity="sha384-crwIf/BuaWM9rM65iM+dWFldgQ1Un8jWZMuh3puxb8TOY9+linwLoI7ZHZT+aekW" crossorigin="anonymous"></script><script>(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;e=o.createElement(i);r=o.getElementsByTagName(i)[0];e.src='//www.google-analytics.com/analytics.js';r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));ga('create',"UA-65933410-1",'auto');ga('send','pageview');</script></body></html>