如何将一个元素的样式放入另一个元素中?我的目标是摆脱包装和.ui可调整大小的处理程序,只留下img,但用替换的样式形成包装。 这可能吗?如何将样式从一个元素传输到另一个元素?
<div class="ui-wrapper ui-draggable" style="overflow: hidden; position: absolute; width: 492px; height: 411px; top: 105px; left: 409px; margin: 0px;">
<img id="link1" style="position: static; margin: 0px; resize: none; zoom: 1; display: block; height: 411px; width: 492px;" src="http://i.imgur.com/gKY7j0l.jpg" class="ui-resizable">
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;">
</div><div class="ui-resizable-handle ui-resizable-s" style="z-index: 90;">
</div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 90;">
</div>
</div>
,以便在这个例子中,结果会是从包装样式的IMG:
<img id="link1" style="overflow: hidden; position: absolute; width: 492px; height: 411px; top: 105px; left: 409px; margin: 0px;" src="http://i.imgur.com/gKY7j0l.jpg" class="ui-resizable">
您是否尝试过的东西为自己,没有? – nuke