From ec9325586535a0067af78586873349f53dcfdd4c Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 28 Nov 2015 15:55:15 +0800 Subject: scroll without a scroll bar http://stackoverflow.com/questions/25095539/allow-scroll-but-hide-scrollbar --- assets/index/Select.less | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'assets/index/Select.less') diff --git a/assets/index/Select.less b/assets/index/Select.less index e93e8f7..4efeac9 100644 --- a/assets/index/Select.less +++ b/assets/index/Select.less @@ -1,12 +1,12 @@ .@{prefixClass}-panel-select { float: left; - overflow-y:auto; font-size: 12px; border: 1px solid #e9e9e9; border-width: 0 1px; margin-left: -1px; box-sizing: border-box; width: 56px; + overflow: hidden; &:first-child { border-left: 0; @@ -19,16 +19,18 @@ ul { list-style: none; - box-sizing: border-box; + box-sizing: content-box; margin: 0; padding: 0; width: 100%; max-height: 144px; + overflow: auto; + padding-right: 16px; } li { list-style: none; - box-sizing: border-box; + box-sizing: content-box; margin: 0; padding: 0 0 0 16px; width: 100%; -- cgit v1.2.3 From 85d09ad3310c26d61b6af60b28d680eed1f2bf1c Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Nov 2015 15:14:32 +0800 Subject: show scrollbar when hover --- assets/index/Select.less | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'assets/index/Select.less') diff --git a/assets/index/Select.less b/assets/index/Select.less index 4efeac9..bca25f9 100644 --- a/assets/index/Select.less +++ b/assets/index/Select.less @@ -8,6 +8,10 @@ width: 56px; overflow: hidden; + &:hover { + overflow-y: auto; + } + &:first-child { border-left: 0; margin-left: 0; @@ -19,18 +23,16 @@ ul { list-style: none; - box-sizing: content-box; + box-sizing: border-box; margin: 0; padding: 0; width: 100%; max-height: 144px; - overflow: auto; - padding-right: 16px; } li { list-style: none; - box-sizing: content-box; + box-sizing: border-box; margin: 0; padding: 0 0 0 16px; width: 100%; -- cgit v1.2.3