<svg id="mb-one_top" style="position: absolute; top: -215px;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
preserveAspectRatio="xMidYMid" width="600" height="862" viewBox="0 0 600 862">
我努力让自己在移动设备上我的SVG较小,所以使用jQuery的我写:覆盖SVG内嵌样式
var width = $(window).width();
if (width == 320) {
$('#mb-one_top').attr('width', '350');
}
但它不是压倒一切,使我的SVG宽度从600到350,有什么想法?
这一点很容易使用CSS代码,你可能想'宽度<600',而不是'宽度== 320'? – Rafi