android webview夜间模式javascript代码
2016-09-01 11:53
435 查看
android webview夜间模式javascript代码
修改Background属性
修改Background-Color属性
利用invert属性翻转网页颜色 CSS代码
修改Background属性
修改Background-Color属性
利用invert属性翻转网页颜色
修改Background属性
修改Background-Color属性
利用invert属性翻转网页颜色 CSS代码
android webview夜间模式javascript代码
本人主要总结了以下三类android webview 夜间模式javascript代码。修改Background属性
修改Background-Color属性
利用invert属性翻转网页颜色
修改Background属性
style=document.createElement('style'); style.setAttribute('type','text/css'); styleElem=document.getElementsByTagName('head')[0].appendChild(style); styleElem.innerHTML=''; child=document.createTextNode('body,body * {background:#2e2e2e !important;color:RGB(200,200,200) !important;}'); styleElem.appendChild(child);
修改Background-Color属性
style=document.createElement('style'); style.setAttribute('type','text/css'); styleElem=document.getElementsByTagName('head')[0].appendChild(style); styleElem.innerHTML=''; child=document.createTextNode('body,body * {background-color:#2e2e2e !important;color:RGB(200,200,200) !important;}'); styleElem.appendChild(child);
利用invert属性翻转网页颜色 CSS代码:
html { background-color : #2e2e2e !important; zoom : 1.055; } body { text-rendering : optimizeSpeed; image-rendering : optimizeSpeed; -webkit-image-rendering : optimizeSpeed; text-shadow : 0 0 0 #000; -webkit-font-smoothing : antialiased; -webkit-filter : invert(1)hue-rotate(180deg); -ms-filter : invert(1)hue-rotate(180deg); filter : invert(1)hue-rotate(180deg); } input,textarea,select{color:purple} img, video, iframe, canvas, svg, embed[type='application/x-shockwave-flash'], object[type='application/x-shockwave-flash'], *[style*='url('] { -webkit-filter : invert(1)hue-rotate(180deg) !important; -ms-filter : invert(1)hue-rotate(180deg) !important; filter : invert(1)hue-rotate(180deg) !important; }
相关文章推荐
- Android 高级UI设计笔记24:Android 夜间模式之 WebView 实现白天 / 夜间阅读模式 (使用JavaScript)
- Android:如何在java代码中覆盖webview中的javascript事件
- Android WebView中的JavaScript代码使用(转载)
- Android记录24-WebView实现白天/夜间阅读模式
- Android WebView中的JavaScript代码使用
- Android WebView与JavaScript代码交互
- Android Webview 通过反射实现夜间模式
- android webView使用js/css实现夜间模式 长按识别图片以及二维码,网页可以上传图片
- Android中WebView的JavaScript代码和本地代码交互的三种方式
- 通过css注入实现的android webview的夜间模式
- Android webview设置字体大小,适配屏幕,夜间模式
- Android WebView中的JavaScript代码使用
- Android WebView中的JavaScript代码使用
- Android webview调用js代码无效 webView.loadUrl("javascript:alert('hello')")
- Android中WebView的JavaScript代码和本地代码交互的三种方式
- Android WebView中的JavaScript代码使用
- Android WebView与JavaScript代码相互调用
- Android WebView使用之JavaScript调用Java代码注意事项
- Android WebView中的JavaScript和java代码的交互
- Android中WebView的JavaScript代码和本地代码交互的三种方式