鱼C论坛

 找回密码
 立即注册
查看: 1887|回复: 1

[技术交流] 求指导

[复制链接]
发表于 2022-1-4 10:05:22 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
<!DOCTYPE html>
<html>
<head>

   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>COCC Home</title>

    <style>
        body {
            margin: 0;
            padding: 0;
        }

        
        div {
            position: absolute;
            margin: 0 auto;
            left: 653px;
            top: 70px;
        }
        
        input {
            position: absolute;
            outline: none;
            font-size: 20px;
            border: 2px solid #4e6ef2;
            border-radius:10px;
            width: 185%;
            height: 40px;
            left: -75%;
            top: 100%;
        }
        
        button {
            position: absolute;
            outline: none;
            font-size: 15px;   
            border-radius:10px;
            color: white;
            background: #4e6ef2;
            width: 25%;
            height: 44px;
            left: 113%;
            top: 100%;
        }
        
        button:hover {
            background: #2D5EE3;
        }
    </style>
    <script>
        window.onload = function (){
            var oBtn = document.getElementsByTagName("button")[0];
            var oTxt = document.getElementsByTagName("input")[0];
            
            function click() {
                if (oTxt.value == "") {
                    location.reload();
                } else {
                    window.open("https://www.baidu.com/s?wd=" + oTxt.value);
                }
            }
            
            oBtn.onclick = click;
            oTxt.onkeydown = function(e) {
                if (!e) e = window.event;
                if (e.keyCode == 13) {
                    click();
                }
            }
        }
    </script>
</head>
  <body>
<div>

        <h1 style="font-size:350%">
                COCC Home</h1>
        <input type="text">
        <button>Go</button>
  </div>
<style tpye="text/css">
.代码{
        position: absolute;
        width:268px;
        height:300px;
        }
.代码 p{
        position: absolute;
        bottom: 0;
        width:140%;
        text-align:center;   
     }
</style>
        <div class="代码">
                <p>&copy;COCC Home-2021(Mingwei Wei)</p>
</div>
  </body>
</html>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-5 07:59:16 From FishC Mobile | 显示全部楼层
没看到你想问什么
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-6-22 19:05

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表