- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 [随笔] Html锚点/JS实现页面内跳转至指定位置(返回顶部、页内定位)
要实现页面内定向跳转 — 以返回顶部为例方法一:HTML锚点实现:1、在顶部标签用 id 命名(‘top’)2、使用 a 标签,其 href 属性写 href="#top" 来实现页面内跳转缺点会让 url 地址发生改变,会受页面路由等的影响而失效。方法二:JS定位1、在顶部某标签用 id 命名(为‘top’)<div class="myHerder" id="to...
2019-12-30 11:24:35 1471
原创 [随笔] 指定div内-让文字在图片上方且水平垂直居中
需求 —— 在一个指定的div(cotainer)内,要实现:图片撑满div文字水平垂直居中文字在图片上方压缩时地下图片能等比例缩小 -> 可设置最小值实现 —— 直接上代码:<div class="cotainer"> <img src="@/../static/img/img_manage_logoBg.png" alt="bg"> <...
2019-12-24 19:47:06 749
转载 [随笔] flex布局设置width无效
父容器设置了 flex 布局,子元素的 width 属性为:240px 会失效解决办法:使用 flex 布局子项属性:flex (flex-basis)属性flex: 1 1 240px;参考:CSNDflex布局
2019-12-23 20:39:45 1676
转载 [随笔] 工具函数-取整函数(ceil、floor、round)
取整函数(ceil、floor、round)向上取整 — Math.ceil()ceil:在英文中,是天花板的意思,有向上的意思,所以,此函数是向上取整,它返回的是大于或等于函数参数,并且与之最接近的整数,在这里以java为例:package com.test;public class CeilTest { private static final double[] TEST...
2019-12-12 15:55:01 209
原创 [随笔] el-row使用非零 gutter 时宽度溢出出现水平滚动条
在使用 elementUI 的 el-row 标签时,如果设置了 gutter 属性 且不为0,那莪会出现水平滚动条(宽度会溢出)案例分析<el-row :gutter="10"> <el-col :span="8"><div class="grid-content bg-purple"></div></el-col> &...
2019-12-10 09:23:18 7077 1
原创 [随笔] elementUI-走马灯carousel 自适应+动态监听浏览器宽度
div部分<el-carousel :interval="5000" arrow="never" :height="bannerHeight + 'px'"> <el-carousel-item v-for="(item,index) in bannerItems" :key="index"> <a :href="item.bannerLink" clas...
2019-12-09 18:35:56 1338
转载 [随笔][转] Element-UI修改默认的菜单样式+el标签选择方法+scope样式穿透
偷个懒,直接贴地址:https://blog.csdn.net/xCyansun/article/details/85374883
2019-12-05 09:56:04 1053
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人