CSS调整大小属性-更改调整大小图标属性 [英] css resize property - change resize icon properties

查看:414
本文介绍了CSS调整大小属性-更改调整大小图标属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有'resize'属性的div.默认情况下,您只能通过拖动窗口的右下角来更改大小.我想知道是否有可能完全改变其行为,例如其外观大小位置.

具体地说,我想做的是允许用户在边缘(而不是角落)上调整窗口的大小,类似于css中的OS窗口(最好仅在一侧).

解决方案

不适用于标准CSS.大小调整器小部件(如滚动条)通常来自OS.您也许可以使用自定义浏览器选择器设置样式,但这取决于浏览器. Webkit您可以使用::-webkit-resizer选择器进行一些有限的样式设置.

#somediv {
    resize: both;
}

#somediv::-webkit-resizer {
    background-color: red;
}

但是,据我所知,您无法调整其宽度.

I have a div with the 'resize' property. By default, you can only change the size by dragging the window's bottom-right corner. I would like to know if it's possible to change the behavior of this at all, such as its appearance, size, or position.

Specifically what I would like to do is allow the user to re-size the window on the edge (rather than the corner), similar to a OS window (preferably on only one side) in css.

解决方案

Not with standard css. The resizer widget, like scrollbars, is typically from OS. You may be able to style it with custom browser selectors, however, that depends on the browser. Webkit you can do some limited styling by using the ::-webkit-resizer selector.

#somediv {
    resize: both;
}

#somediv::-webkit-resizer {
    background-color: red;
}

But you cannot adjust its width as far as I can tell.

这篇关于CSS调整大小属性-更改调整大小图标属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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