就我所知有夜间模式的手机浏览器有UC浏览器、百度浏览器、海豚刘拉你器、QQ浏览器。夜间模式可以避免晚上屏幕的刺眼白光,但是又不是仅仅把屏幕调暗而已,还需要对文字做反光处理。
我先来给你展示一下PC上是如何实现的,然后你就能明白手机浏览器的情况了。
首先需要写一个CSS样式表单。代码如下。
*{background-image: none !important;background: none !important;background:#333333 !important;color:#888888!important;border-color:#555555 !important;
scrollbar-arrow-color:#CCCCCC !important;scrollbar-base-color:#2266AA !important;scrollbar-shadow-color:#2266AA !important;scrollbar-face-color:#333333 !important;scrollbar-highlight-color:#2266AA !important;scrollbar-dark-shadow-color:#2266AA !important;scrollbar-3d-light-color:#2266AA !important;scrollbar-track-color:#333333 !important;}
a,a *{color:#88AADD !important;text-decoration:none !important;}a:visited,a:visited *,a:active,a:active *{color:#5588AA !important;}
a:hover,a:hover *{color:#AADD88 !important;background:#666666 !important;}input,select,option,button,textarea{color:#AAAAAA !important;background:#555555 !important;
border:#666666 !important;border-color: #666666 #888888 #888888 #666666 !important;}input:focus,select:focus,option:focus,button:focus,textarea:focus,input:hover,
select:hover,option:hover,button:hover,textarea:hover {color:#BBBBBB !important;background:#5A5A5A !important;border-color: #777777 #999999 #999999 #777777 !important;}
input[type=button],input[type=submit],input[type=reset],input[type=image] {border-color: #888888 #666666 #666666 #888888 !important;}input[type=button]:focus,
input[type=submit]:focus,input[type=reset]:focus,input[type=image]:focus, input[type=button]:hover,input[type=submit]:hover,input[type=reset]:hover,input[type=image]:hover {
color:#BBBBBB !important;background:#666666 !important; border-color: #AAAAAA #888888 #888888 #AAAAAA !important;}