h5-intercom 样式调整问题 Posted on 2017-12-28 14:35 1234567891011121314151617<script> function addNewStyle(newStyle) { var styleElement = document.getElementById('styles_js'); if (!styleElement) { styleElement = document.createElement('style'); styleElement.type = 'text/css'; styleElement.id = 'styles_js'; document.getElementsByTagName('head')[0].appendChild(styleElement); } styleElement.appendChild(document.createTextNode(newStyle)); } addNewStyle('#intercom-container .intercom-messenger-frame>iframe{top:10% !important;}') addNewStyle('#intercom-container .intercom-messenger-frame>iframe{position:absolute !important;}') addNewStyle('#intercom-container .intercom-app div.intercom-messenger-frame iframe{height:90% !important;}')</script> 其实很简单 就是找到合适的class 给他赋予样式ps:一定要写在layout里面 才能全局通用