web前端 html+css+javascript网页设计实例 企业网站制作

web前端 html+css+javascript网页设计实例 企业网站制作(案例源码链接在文章末尾,仅供学习参考)一、在浏览器中的运行结果:二、部分代码1.HTML:<!DOCTYPEhtml><html><headlang=”en”><metacharset=”UTF-8″><title>启乐官网</title><linkrel=”stylesheet”href=”style.css”/><scriptsrc=”myjs.j

大家好,又见面了,我是你们的朋友全栈君。

(案例源码链接在文章末尾,仅供学习参考)
一、在浏览器中的运行结果:
在这里插入图片描述
二、部分代码
1.HTML:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>启乐官网</title>
    <link rel="stylesheet" href="style.css"/>
    <script src="myjs.js" charset="gb2312"></script>
</head>
<body>

<header>                                          <!-- 页眉 -->
    <a id="hah" href="home.html" title="启乐首页"><h1>启乐</h1></a>                      <!-- logo点击跳往首页 -->
    <h3 id="hh">------美好生活的开始</h3>
    <a id="ha2" href="" title="注册/登录"><h3>注册/登录</h3></a>
</header>

<nav>                                                    <!--导航链接 -->
    <ul>
        <li><a href="home.html">首页</a></li>
        <li><a href="introudction.html">企业介绍</a></li>

        <div class="nud">
            <a href="product.html" class="nuda">产品中心</a>
            <div class="nudd">
                <a href="product.html">客厅家具系列</a>
                <a href="product.html">床上用品</a>
                <a href="product.html">美容护肤系列</a>
                <a href="product.html">精品服装</a>
                <a href="product.html">限时优惠</a>
            </div>
        </div>

        <li><a href="https://www.baidu.com/s?rtt=1&bsst=1&cl=2&tn=news&word=%E5%90%AF%E4%B9%90" target="_blank">新闻动态</a></li>
        <li><a href="join.html">加入我们</a></li>
    </ul>
</nav>

<div class="box">                                                 <!--第一个盒模型-->
        <div id="ha1">                                            <!-- 动画 广告轮播区域-->

        </div>

        <aside id="ha3">                                          <!-- 边栏区 联系我们 -->
            <div id="ad">
            <img src="image/contact02.jpg" alt=""/>
            <div>
                <table class="tab01">
                    <tr>
                        <td>地址:</td>
                        <td>北京市东城区棉花胡同01</td>
                    </tr>
                    <tr>
                        <td>电话:</td><td>010-12345678</td>
                    </tr>
                    <tr>
                        <td>邮箱:</td><td>qile@163.com</td>
                    </tr>
                </table>

            </div>
            </div>
        </aside>

</div>

<div class="box01">                                             <!--第二个盒模型-->

    <div class="new">                                                  <!--热卖商品-->
        <div><img id="nd" src="image/hot.jpg" alt=""/></div><br/>

        <a href="" title="棉芯枕头" id="ba1">
            <img id="na" src="image/product01.jpg" alt=""/><br/>
            <h3>棉芯枕头 特价¥50</h3>
        </a>

        <a href="" title="机械键盘" id="ba2">
            <img id="na1" src="image/product02.jpg" alt=""/><br/>
            <h3>机械键盘 特价¥100</h3>
        </a>

        <a href="" title="精美橱柜" id="ba3">
            <img id="na2" src="image/product05.jpg" alt=""/><br/>
            <h3>精美橱柜 特价¥600</h3>
        </a>


    </div>

    <div class="register">                                               <!--登录表单-->
        <img id="ri" src="image/register.jpg" alt=""/><br/>

        <form action="" id="fo">
            <table>
            <tr>
                <td>用户名</td>
                <td><input type="text" id="user01" maxlength="11" placeholder="请输入您的用户名" required/></td>
            </tr>

                <tr id="fot">
                    <td>密码</td>
                    <td><input type="password" id="password01" maxlength="16" required/></td>
                </tr>

                <tr>
                    <th colspan="2"><input type="submit" value="登录"></th>
                </tr>
            </table>
        </form>

        <div class="dbd">
        <a href="" >忘记密码</a>
        <a href="" id="zc">注册账号</a>
        </div>

    </div>
</div>

<div class="news">
    <img id="nei" src="image/news.jpg" alt=""/><br><br>
    <div class="box03">
    <div class="nd">
        <a href="https://www.baidu.com/s?rtt=1&bsst=1&cl=2&tn=news&word=%E5%90%AF%E4%B9%90" target="_blank" title="企业新闻">CCKA零售创新奖、十大创新业态在会议期间隆重揭晓,<br>由启乐打造的时尚原创生活类
        自营电商平台“启乐优选”<br>从上百个候选案例中脱颖而出,斩获CCKA零售创新奖。</a>
    </div>

<div id="nea02">
        <a href="https://www.baidu.com/s?rtt=1&bsst=1&cl=2&tn=news&word=%E5%90%AF%E4%B9%90" target="_blank" title="企业新闻">启乐中国新世代于北京正式开幕。北京<br>
            京东店选址中国电商的代表企业——总部园区内,这是<br>
            HOTEL后在中国的一次新世代事业形态布局。</a>
</div>
    </div>

</div><br><br><br><br>

<footer>                                                                    <!-- 页脚区 -->
            Copyright © 18网汉*** All Rights Reserved. 版权所有
</footer>
<br>
</body>
</html>

2.CSS

*{ 
   
    /*background-color: #5F822F;*/
}
#ha2{ 
   
    position:absolute;
    left: 1400px;
    text-decoration: none;
}
#ha2:hover{ 
   
    background-color: aqua;
}

header{ 
   
    height: 150px;
    background-image: url("image/header01.jpg");
    background-repeat: round;
}
#hah{ 
   
    text-decoration: none;
}

#hah:hover{ 
   
    background-color: aqua;
}

#hh{ 
   
    color: coral;
    position:absolute;
    left:100px;
    top: 30px;
}
nav{ 
   
    width: 1000px;
}
nav ul{ 
   
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    background-color: bisque;
    height: 40px;
    font-size: x-large;
    font-weight: 800;
    list-style-type: none;
    overflow: hidden;

}
nav ul li a{ 
   
    text-decoration: none;
    padding: 12px 50px;
    /*padding: 1px 5px;*/
}

nav ul li a:hover{ 
   
background-color: burlywood;

}

.nud{ 
   
    display: inline-block;
}

.nudd{ 
   
    display: none;
    position: absolute;

    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);

}


.nud:hover .nudd{ 
   
    display: block;
}


.nudd a:hover{ 
   
    background-color: aquamarine;


}

.nuda{ 
   
    display: inline-block;
    text-decoration: none;
}

.nuda:hover{ 
   
    background-color: burlywood;
}

.nudd a{ 
   
    display: block;
    color: crimson;
    padding: 12px 50px;
    text-decoration: none;
}

.box{ 
   
    display: flex;
}



@-webkit-keyframes myfirst { 
   
    0%{ 
   
        background-image: url("image/wuy00.jpg");

    }

    25%{ 
   
        background-image: url("image/wuy01.jpg");
    }
    50%{ 
   
        background-image: url("image/wuy02.jpg");
    }

    75%{ 
   
        background-image: url("image/wuy03.jpg");
    }
}


#ha1{ 
   
    flex: 60%;
    width:60%;
    height:450px;
    background-size: 100%;
    background-image:url("image/wuy00.jpg") ;
    -webkit-animation: myfirst 8s infinite;
}

#ha3{ 
   
flex: 40%;
}
#ad{ 
   
    padding-left: 20px;
}

.tab01 td{ 
   
    border:2px solid;
    border-color: blueviolet;
    background-color: aquamarine;
    height: 50px;
}
.tab02 td{ 
   
    border:2px groove;
    border-color: bisque;
    background-color: bisque;
    height: 50px;
}
.box01{ 
   
    display: flex;
}
.new{ 
   
    flex: 60%;
}
.new h3{ 
   
    color: red;
}
.register{ 
   
    flex: 40%;
    padding-top: 10px;
    padding-left: 20px;
}
#nd{ 
   
    padding-top: 10px;
    width: 900px;
    height:83px;

}

#ba1{ 
   
    float: left;
}
#ba2{ 
   
    float: left;
    padding-left: 50px;
}
#ba3{ 
   
    float: left;
    padding-left: 50px;
}

@keyframes mysec { 
   
    0%{ 
   
        transform:scale(0.7);}
    25%{ 
   
        transform:scale(1);  }

}

#na{ 
   
    width:250px;
    height:200px;
}
#na:hover{ 
   
    animation: mysec 5s linear infinite;
}
#na1{ 
   
    width:250px;
    height:200px;
}
#na1:hover{ 
   
    animation: mysec 5s linear infinite;
}
#na2{ 
   
    width:250px;
    height:200px;
}
#na2:hover{ 
   
    animation: mysec 5s linear infinite;
}
#ri{ 
   
    padding-top: 1px;
    width: 400px;
    height:83px;
}
#fo{ 
   
    padding-top: 20px;
}
.dbd{ 
   
    padding-left: 10px;
    padding-top: 20px;
}
#zc{ 
   
    padding-left: 80px;
}
#nei{ 
   
    padding-top: 10px;
}
.nd{ 
   
    padding-left: 30px;
}
.box03{ 
   
    display: flex;
}
#nea02{ 
   
    float: left;
    padding-left: 80px;
}

.intd{ 
   
    padding-left: 80px;
}



footer{ 
   
    text-align: center;
    background-color: #83B441;
    height: 50px;
}

3.Javascript

window.onload=function(){ 
   
    if(document.getElementById("fo") != null){ 
   
        document.getElementById("fo").onsubmit=function(){ 
   
            var yhm = document.getElementById("user01");
            var mm = document.getElementById("password01");

            if(!(/^1\d{10}$/.test(yhm.value))){ 
             /*用正则表达式,检查输入的用户名格式是否为以1开头的11位数*/
                alert("输入用户名格式错误,请重新输入以1开头的11位数用户名!");
                return false;
            }

            if (mm.value != 12345) { 
   
                alert("密码输入错误,请重新输入!");
                return false;
            }
            return ture;
        }
    }




}

声明:案例中的图片素材来源于网络
案例资料源码下载链接:https://pan.baidu.com/s/1ThL8dXKbjmCV59_Pms3oPw
提取码:na30

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/149317.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 获取不同长度的UUID[通俗易懂]

    获取不同长度的UUID[通俗易懂]在公司,有时候让处理一些命名规则时,要使用一个唯一标识,还是十六进制的,需要多少位看领导心情.怎么做呢?你别说用随机产生组合的方法啊?虽然那个可行,但是我觉得难受.知道有UUID这个玩意儿之后,那就好办了.UUID含义是通用唯一识别码(UniversallyUniqueIdentifier),这是一个软件建构的标准,也是被开源软件基金会(OpenSoftwareFoundatio

    2022年8月10日
    13
  • rsyslogd_Syslog

    rsyslogd_Syslog最近遇到一个需求,需要把线上环境的debug日志及集中化收集起来,一方面是方便开发调试;一方面是避免直接到线上环境查看,存在安全隐患。常用可选方案:rsyslog发送端+rsyslo…

    2022年8月15日
    3
  • 兼职程序员一般可以从什么平台接私活?(程序员不上班接私活可行吗)

    程序员除了在公司上班之外,有时候也需要接私活赚些外快补贴家用,那么国内有哪些渠道可以提供大量的职位呢?笔者从16年接私活以来,积累了一些靠谱的方法推荐给大家,以下是几个国内主流并且不同业务类型的平台,供大家筛选:1、BAT级程序员技术众包平台-猿急送 (https://www.yuanjisong.com/)【概况】这个是国内比较早做技术众包的平台,包括单个的开发型任务,比如PHP开发…

    2022年4月16日
    71
  • 测试用例等价类划分法讲解_等价类分析法设计用例的方法

    测试用例等价类划分法讲解_等价类分析法设计用例的方法1.提交缺陷报告遇到的问题1.不知道是否全面测试了所有的内容(1)是不是所有的功能点都测试到了(2)是不是每个功能点都测试全面了2.存在大量冗余测试,影响测试效率(1)有些功能点可能测试多次3.对新版本的测试效果很难实施(1)每个版本测试的数据、步骤都不一样,随意性很强4.测试的覆盖率无法衡量(1)测试的好坏不得而知5.……为了避免以上问题,所以做测试用例,对测试过程可控,对测试质量有把握。2.什么是测试用例?(1)测试用例主要记录了测试的目的、步骤、输入的数据、预期结果等内容,它

    2022年10月17日
    5
  • VMware P2V报错

    VMware P2V报错VMwareP2Vwin2008R2操作系统,第一步报错:fault.agentinstallfault.summary,无法在源主机临时安装agent代理,手工将vmware-converter-agent安装程序传到源主机安装,提示报错:error29142couldnotstartservicevstor2mntapi2.0driver(shared),原因是这台源主机以前

    2022年7月16日
    56
  • goland 2022.01.13 激活码(注册激活)

    (goland 2022.01.13 激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html40…

    2022年4月2日
    205

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号