html
爱前端不爱恋爱
小白一个~喜欢前端
展开
-
http-server启动本地文件
在写前端页面中,经常会在浏览器运行HTML页面,从本地文件夹中直接打开的一般都是file协议,当代码中存在http或https的链接时,HTML页面就无法正常打开,为了解决这种情况,需要在在本地开启一个本地的服务器。本文是利用node.js中的http-server,开启本地服务,步骤如下:1 下载node.js官网地址: https://nodejs.org下载完成后在命令行输入命令$ node -v以及$ npm -v检查版本,确认是否安装成功。2 下载http-server在终端输入:$转载 2021-06-11 09:58:13 · 770 阅读 · 1 评论 -
铃铛抖动效果 css
// css.helpTips { animation-name: upAnimation; transform-origin: center bottom; animation-duration: 2s; animation-fill-mode: both; animation-iteration-count: infinite; animation-delay: .5s; }@keyframes upAnimatio原创 2021-04-27 18:37:25 · 1305 阅读 · 2 评论 -
vsCode Emmet快速书写css方法
写几个常用到的css快捷输入箭头左边的都是快捷输入 加 TAB键基本不输入单位默认pxw10em => width: 10em;w100 => width: 100px;h100 => height: 100px;tac => text-align: center;ti10=> text-indent: 10px;//缩进td => text-decoration: none;lh10px => line-height: 10px;//默认无单位原创 2021-03-09 17:34:34 · 685 阅读 · 1 评论 -
原生js 监听textarea文本框内容自适应
不用框架的情况下 这种自适应高度文本很不错css <style type="text/css"> h2 { text-align: center; margin: 50px auto; } #textarea { display: block; margin: 0 auto; overflow: hidden; width: 300px; font-si原创 2020-11-16 10:05:55 · 628 阅读 · 2 评论