我想在JavaScript文件中使用JavaScript格式化代码。码---
@media (min-width: 1100px) {
.ow_miniic_comment.newsfeed_comment_btn,
.ow_miniic_like.newsfeed_like_btn,
div.ow_dnd_widget,
.ow_newsfeed_avatar,
.ow_bl.ow_box_toolbar li,
.ow_newsfeed_body,
.ow_ipc_info {
visibility: hidden;
}
.ow_miniic_comment.newsfeed_comment_btn.already-visible,
.ow_miniic_like.newsfeed_like_btn.already-visible,
div.ow_dnd_widget.already-visible,
.ow_newsfeed_avatar.already-visible,
.ow_bl.ow_box_toolbar li.already-visible,
.ow_newsfeed_body.already-visible,
.ow_ipc_info.already-visible {
animation: none;
visibility: visible;
}
.ow_miniic_comment.newsfeed_comment_btn.animation_start {
visibility: visible;
-webkit-animation-name: zoomIn;
-moz-animation-name: zoomIn;
-o-animation-name: zoomIn;
-ms-animation-name: zoomIn;
animation-name: zoomIn;
-webkit-animation-duration: 0.3s;
-moz-animation-duration: 0.3s;
-o-animation-duration: 0.3s;
-ms-animation-duration: 0.3s;
animation-duration: 0.3s;
}
}
希望将上面的代码放在带有JavaScript格式的html文件中。
是否有可能压缩代码以加快网站加载速度。
答案 0 :(得分:0)
包括jquery然后把这段代码
RealmConfiguration config1 = new RealmConfiguration.Builder(context)
.name("old-name")
.encryptionKey(getOldKey())
.build()
Realm realm = Realm.getInstance(config1);
realm.writeEncryptedCopyTo(new File(context.getFilesDir(), "new-name"), getNewKey());
realm.close();
RealmConfiguration config2 = new RealmConfiguration.Builder(context)
.name("new-name")
.encryptionKey(getNewKey())
.build()