我使用js创建了一个元素,并导入了相关的css,但是我无法获得元素的宽度,这是代码:
css:
#mainDiv{
position:absolute;
width:500px;
height:500px;
}
js:
var mainDiv=document.createElement("div");
mainDiv.setAttribute("id","mainDiv");
document.body.appendChild(mainDiv);
//now I want to get the width of the '
我正在尝试使用我自己的css修改iframe中的一些div类,并更改Twitter块的Drupal 8外观。但是,我遇到了很多错误,比如$ is not a function等等.我认为我的js加载得太快了(在js之前),但是,我检查了元素,一切都应该正常工作。(现在没有错误)
<iframe id="twitter-widget-0" class="twetter-timeline" >
<html>
<head></head>
<body>
<div c