overflow

overflow:hidden用法

匿名 (未验证) 提交于 2019-12-02 23:43:01
最近学习css的overflow元素的hidden属性,总结2点作用: 1、当父元素设置了height值时,则设置overflow:hidden后,子元素超出父元素部分隐藏 2、当父元素的高度是靠子元素撑开的时候,子元素浮动时,则在父元素使用overflow: hidden可以清除浮动,使得父元素的高度依旧是靠子元素撑开。 作用1示例: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #div1{ width: 500px; border: 1px solid red; height: 50px; overflow: hidden; } #div2{ width: 100px; height: 100px; border:1px solid blue; float: left; } </style> </head> <body> <div id="div1"> <div id="div2"></div> </div> </body> </html> 效果: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #div1

解决移动端浏览器页面 X轴横向滚动条问题

匿名 (未验证) 提交于 2019-12-02 23:43:01
写web端页面的时候,总是会出现横向滚动条,即 X 轴滚动条,导致页面左右滑来滑去。 解决代码: html { overflow-y: scroll; } :root { overflow-y: auto; overflow-x: hidden; } :root body { position: absolute; } body { width: 100vw; overflow: hidden; } 内容参考自 张鑫旭大神的《小tip:CSS vw让overflow:auto页面滚动条出现时不跳动》

ORA-01426:numeric overflow

匿名 (未验证) 提交于 2019-12-02 23:34:01
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hoho_12/article/details/90312764 问题描述: 1.使用ibatis框架调用存储过程,此存储过程的业务是根据起始值和结束值用循环批量新增数据。此时起始值和结束值输入了一个13位数:1000000000001,1000000000010,这时工程应该生成以1000000000001开头,以1000000000010结尾的数据,但是java层调用以后,却生成了异常数据,表现为负数。 问题分析与调试: 1.首先排查是不是过程的问题,把入参带入plsql中调试,过程直接就报错了。过程报:ORA-01426:numeric overflow,数字溢出。但是这个字段数据库长度是number(15),应该不会超过长度啊。网上查了下,原来for循环对长度有限制。 在FOR循环中可能会遇到ORA-01426,主要是由于起始值或者结束值超过了2147483647,默认情况下 FOR 循环的数值需要 在-2147483648 到 2147483647之间,否则就会报错。 参考文章: http://blog.chinaunix.net/uid-22948773-id-3047969.html https://blog.csdn.net/bisal/article/details

Vue - 让水平滚动条(scroll bar)固定在浏览器的底部

匿名 (未验证) 提交于 2019-12-02 23:06:17
在几个小时的google和stack overflow的苦苦搜索后,无果。 经过自我思考,想到了一种实现方法: 整个页面是一个盒子,要出现滚动条,必然里面的元素要溢出。也即是,元素水平overflow,那么就出现水平滚动条。元素垂直overflow,那么会出现垂直滚动条。 我原先是讲眼光放在局部的小盒子(如下图),无论我怎么调整display或者overflow,当这个局部的元素溢出的时候,滚动条是根据这个局部生成的。 那么我如果要把水平滚动条出现的时候固定在底部,我就要把眼光放在整个大盒子(全局)。 .board-container { display: flex; overflow: visible;(默认) // 如果overflow: scroll或者auto 会失效。 } export default { name: 'DefaultLayout', components: { MyHeader, }, mounted: function () { this.$nextTick(function () { var div = document.querySelector('.main-container'); div.style.height = window.innerHeight + 'px'; console.log('mounted: ', div);

textarea的高度自适应

匿名 (未验证) 提交于 2019-12-02 22:56:40
1.只读状态下的高度自适应 // maxHeight为最大高度 function autoTextarea ( maxHeight ){ $ . each ( $ ( "textarea" ), function ( i , n ){ $ ( "#textarea" ). css ( "overflow" , "hidden" ); var _height = n . scrollHeight ; $ ( n ). height ( _height ); if ( $ ( n ). height () > maxHeight ){ $ ( n ). height ( maxHeight ); $ ( "#textarea" ). css ( "overflow" , "auto" ); } }) } 效果图: 2.编辑状态下的高度自适应 $ . each ( $ ( "textarea" ), function ( i , n ){  $ ( n ). height ( n . scrollHeight );  $ ( n ). on ( ‘ input ‘, function (){ if ( n . scrollHeight > n . offsetHeight ){   $ ( n ). height ( n . scrollHeight )    } }) }) 删除时

IE 8 absolute positioned element outside its parent clipping problem

不想你离开。 提交于 2019-12-02 22:53:00
I have an absolute positioned div inside another absolute positioned div. The child div content is much bigger than the parent can contain. This is by design. I need the child div to spill out of its parent. It does so in every other browser except IE 8 (IE 7 looks OK, not sure) In IE8 the part of the child that is out of parent is clipped. It is there, but just not visible as can be verified by IE developer tools. I tried z-index, tried explicitly setting overflow:visible, no luck at all. UPDATE: I found out that the problem is caused by a filter defined in the parent div like this: -ms

jfinal中excel表格导出

匿名 (未验证) 提交于 2019-12-02 21:53:32
  今天工作中遇到了excel表格导出的操作,还好有写好的模板,不然我也是焦头烂额,下面记录一下excel表格导出的操作步骤,同时用来给正在学习jfinal的小伙伴一些参考和学习。   首先我们需要把表格查询出并且显示在页面上,下面是页面跳转时经过的Controller:(这里包含条件查询,所以获取信息比较复杂,全部查询只需要将获取到的pageUtils 传到前台即可,不需要添加多余的查询条件,在这里传给前台的变量名我叫他page) public void index(){ PageUtils pageUtils = getPageParameter(); String where = " where 1=1 "; //获取当前时间 String nowDate =DateUtils.getDate(); if(pageUtils.getMap().get("orderNo")!=null&&!pageUtils.getMap().get("orderNo").toString().trim().equals("")){ where = where + " and order_no like '%"+pageUtils.getMap().get("orderNo")+ "%' "; } if(pageUtils.getMap().get("customerName")!=null&

css 设置overflow:scroll 滚动条的样式

匿名 (未验证) 提交于 2019-12-02 20:32:16
/* 定义滚动条样式 */ ::-webkit-scrollbar { width: 6px; height: 6px; background-color: rgba(240, 240, 240, 1); } /*定义滚动条轨道 内阴影+圆角*/ ::-webkit-scrollbar-track { box-shadow: inset 0 0 0px rgba(240, 240, 240, .5); border-radius: 10px; background-color: rgba(240, 240, 240, .5); } /*定义滑块 内阴影+圆角*/ ::-webkit-scrollbar-thumb { border-radius: 10px; box-shadow: inset 0 0 0px rgba(240, 240, 240, .5); background-color: rgba(240, 240, 240, .5); }    文章来源: https://www.cnblogs.com/web-aqin/p/11244121.html

vue表格实现固定表头首列

匿名 (未验证) 提交于 2019-12-02 20:32:16
最近在做vue移动端项目,需要做一个可以固定表头首列的表格,而且由于一些原因不能使用任何UI插件,网上找了很久也没什么好方法,所以在解决了问题之后,写下了这篇文章供后来人参考,文章有什么错漏的问题欢迎评论交流。 ˼· 要实现固定首行首列 除了使用各种UI框架插件外,那就是自己用原生写啦 首先我们理一下思路 如何固定首行首列呢? 可能每个人有不同的想法 我这里当然介绍的是我自己的想法 那就是把首列表头和表格主内容分割开来,如下图 不过这样虽然固定了表头首列 但还是不能实现我们想要的效果 因为你会发现当你滑动tbody的时候 表头和首列并不会移动 相信聪明的你已经有了解决的办法了 那就是给tbody添加一个滑动监听 滑动的时候会触发事件 引起表头和首列的移动 这就是本文固定表头首列的思路 <template> <div class="pages" ref="pages"> <div class = "content" ref="table"> <!--首列固定(就是只有首列数据)--> <div class = "left-content"> <div class="table-left" ref="firstColLayer" data-_ref="firstColLayer"> <table class= "full-table"> <thead> <tr v-for =

css overflow hidden increases height of container

南楼画角 提交于 2019-12-02 20:15:58
Please have a look at this fiddle - http://jsfiddle.net/Z27hC/ var container = document.createElement('span'); container.style.display = 'inline-block'; container.style.marginTop = '10px'; container.style.marginLeft = '50px'; container.style.background = 'lightblue'; document.body.appendChild(container); var cell = document.createElement('span'); cell.style.display = 'inline-block'; cell.style.border = ' 2px solid black'; cell.style.width = '200px'; cell.style.height = '16px'; cell.style.overflow = 'hidden'; container.appendChild(cell); var text_node = document.createTextNode('hallo'); cell