下面是一个简单的Android电视关闭效果的示例代码:
```html
body {
margin: 0;
padding: 0;
background-color: #000;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.screen {
width: 100%;
height: 100%;
background-color: #000;
position: relative;
overflow: hidden;
}
.power-off {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 300px;
height: 300px;
background-color: #fff;
border-radius: 50%;
animation: power-off 1s ease-in-out forwards;
}
@keyframes power-off {
0% {
transform: translate(-50%, -50%) scale(0);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(20);
opacity: 0;
}
}
setTimeout(function() {
window.location.href = "https://www.example.com"; // 跳转到需要的页面
}, 1000); // 1 秒后跳转
```
这个示例使用 CSS 动画来实现一个简单的电源关闭效果。当页面加载时,会出现一个白色的圆圈在屏幕中央快速放大并消失。在这个过程中,页面会在 1 秒后自动跳转到另一个页面。
您可以根据需要调整动画时间、圆圈大小和颜色等属性来自定义效果。同时也可以添加其他元素或音效来丰富整个关闭过程。