gpt4 book ai didi

html - 将属性从一个框架复制到另一个框架

转载 作者:行者123 更新时间:2023-11-28 08:36:46 25 4
gpt4 key购买 nike

我很难从一个框架复制属性并创建一个类似的框架(见下图)。左边的图片,花朵般的,是我想要的属性。我想把它添加到右边的图像中(蓝色的)。我试过使用 google chrome 编辑组件,但我无法弄明白。

我只希望右边的图像与左边的图像具有相同的属性(大小和框架)。

The URL to this scenario

最佳答案

查看您的页面,我认为您应该这样做(我正在使用 jQuery)。

$(document).ready(function(){
var img = $('.attachment-shop_catalog');
var width = img.width();
var height = img.height();

//give an id or a class to identify your target img, i'm using id target-img

$('#target-img').css('width',width+'px');
$('#target-img').css('height',height+'px');

});

关于html - 将属性从一个框架复制到另一个框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28000983/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com