“overflow-x:hidden”一边只? [英] "overflow-x:hidden" one side only?

查看:349
本文介绍了“overflow-x:hidden”一边只?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能只隐藏一个元素的水平溢出:左或右?像 overflow-x-right:hidden;

Is it possible to hide the horizontal overflow of an element on one side only: left or right? Something like overflow-x-right:hidden;. I am open to css and jquery based tips.

推荐答案

除非另有定义,所有内容都从左边开始。所以如果你想隐藏左边的内容,考虑使元素 position:absolute ,并将其设置为 right:0 。结合 overflow-x:hidden ,这应该可以实现您的目标。

All content starts on the left, unless otherwise defined. So if you want content on the left to be hidden, consider making the element position: absolute, and setting it to right: 0. Combine that with overflow-x: hidden, which should accomplish your goal.

这篇关于“overflow-x:hidden”一边只?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆