html表格插入图标调整宽度,css – gridster c3图表自动调整大小问题

您正在使用的选项:

size: {

height: 100,width: 100

}

将svg元素的高度和宽度设置为100px而不是100%

我试过了

size: {

height: '100%',width: '100%'

}

这将成功地将宽度设置为100%但不知何故高度将设置为320px

所以,如果你把它添加到你的CSS:

.c3 svg {

width: 100%;

height: 100%;

}

这将解决您的尺码问题.

编辑

只需稍微更改即可设置初始大小,并在resize – stop事件处理程序中向控制器添加一些注释,您需要根据新大小添加一些图表大小调整. See it here

resizable: {

enabled: true,handles: ['n','e','s','w','ne','se','sw','nw'],// optional callback fired when resize is started

start: function(event,$element,widget) {},// optional callback fired when item is resized,resize: function(event,// optional callback fired when item is finished resizing

stop: function(event,widget) {

// here should update the size according to the widget size

// widget.sizeX (* 160px) and widget.sizeY (* 160px)

// and further adjustments

}

},

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值