回答編集履歴

2

読みやすく修正。

2019/02/28 17:55

投稿

kei344
kei344

スコア69407

test CHANGED
@@ -1,4 +1,4 @@
1
- これでどうでしょう。
1
+ ~~これでどうでしょう。~~
2
2
 
3
3
  ```js
4
4
 

1

ミスがあったため修正。

2019/02/28 17:55

投稿

kei344
kei344

スコア69407

test CHANGED
@@ -7,3 +7,29 @@
7
7
  $( this ).css( { height: this.contentWindow.document.documentElement.scrollHeight + "px!important" } );
8
8
 
9
9
  ```
10
+
11
+
12
+
13
+ ---
14
+
15
+
16
+
17
+ **追記:**
18
+
19
+
20
+
21
+ ```js
22
+
23
+ $( this ).height( 0 );
24
+
25
+ var imp = $( this ).attr( "style" );
26
+
27
+ $( this ).css( { 'cssText': imp + 'height: ' + this.contentWindow.document.documentElement.scrollHeight + 'px !important;' } );
28
+
29
+ ```
30
+
31
+
32
+
33
+ 【jQueryでCSSの!important指定を行う - Qiita】
34
+
35
+ [https://qiita.com/shouchida/items/796f80bfe8bde31f1f79](https://qiita.com/shouchida/items/796f80bfe8bde31f1f79)