win12
win12 copied to clipboard
细节
你好。 我有以下几个意见:
1、当控制中心-WIFI关闭时,edge浏览器应该显示无网络才对,这是细节。
2、win12网页版还不支持自动深色模式,css实现如下:
@media (prefers-color-scheme: light) { /*light : 浅色*/
/*主题设置为浅色。*/
}
}
@media (prefers-color-scheme: dark) { /*dark : 深色*/
/*主题设置为深色。*/
}
js代码如下:
const isDarkTheme = window.matchMedia("(prefers-color-scheme: dark)"); // 是深色
if (isDarkTheme.matches) { // 是深色
// 主题设置为深色。
} else { // 不是深色
// 主题设置为浅色。
}
祝你早日完善所有功能!
非常感谢您的宝贵意见! 我们将在下一版本更新 谢谢
谢谢建议 问一下这个css和js是都要写吗?还是只用写一个呢?
选一个方便的来写就行了。代码来自CSDN:https://blog.csdn.net/yenoxin/article/details/119865493#:~:text=%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%20window.matchMedia%20%28%22%20%28prefers-color-scheme%3A%20%E4%B8%BB%E9%A2%98%29%22%29%3B%20%E6%9D%A5%E8%8E%B7%E5%8F%96%E3%80%82%20const%20isDarkTheme,%E6%98%AF%E6%B7%B1%E8%89%B2%20if%20%28isDarkTheme.matches%29%20%7B%20%2F%2F%20%E6%98%AF%E6%B7%B1%E8%89%B2%20%2F%2F%20%E4%B8%BB%E9%A2%98%E8%AE%BE%E7%BD%AE%E4%B8%BA%E6%B7%B1%E8%89%B2%E3%80%82
还有,搜索有问题。我搜索“1+1”,结果却是“1 1”;搜索“C#form”,结果只出来了“C”。我问了ChatGPT,根据它的回答,我找到了方法:将mainpage.html中
window.location='https://bing.com/search?q='+this.value;
这一行改成
window.location='https://bing.com/search?q='+encodeURIComponent(this.value); //encodeURIComponent 可以对搜索内容进行编码
就没有问题了
对了,全屏使用让用户体验更佳:
function toggleFullscreen() {
//执行一下启动全屏,再执行一次退出全屏
try{
if (document.fullscreenElement) {
if (document.exitFullscreen) {
document.exitFullscreen();
}
} else {
if (fullscreenElement.requestFullscreen) {
fullscreenElement.requestFullscreen();
}
}
} catch(err) {
console.log("当前浏览器不支持全屏");
}
}
非常感谢您的意见!