2025年网页制作代码模板和素材(做一个网页代码模板)

网页制作代码模板和素材(做一个网页代码模板)lt link rel stylesheet href https m sohu com a styles css gt lt script src https code jquery com jquery 3 6 0 min js amp rdquo

大家好,我是讯享网,很高兴认识大家。



<link rel=“stylesheet” href=”https://m.sohu.com/a/824263911_121614593/styles.css”>

<script src=”https://code.jquery.com/jquery-3.6.0.min.js”></script>

<script src=”https://m.sohu.com/a/824263911_121614593/scripts.js”></script>

</head>

<body>

<!– Header –>

<header>

<div class=“container”>

<h1>企业名称</h1>

<nav>

<ul>

<li><a href=”https://m.sohu.com#home”>首页</a></li>

<li><a href=”https://m.sohu.com#about”>关于我们</a></li>

<li><a href=”https://m.sohu.com#services”>服务</a></li>

<li><a href=”https://m.sohu.com#contact”>联系我们</a></li>

</ul>

</nav>

</div>

</header>

<!– Home Section –>

<section id=“home”>

<div class=“container”>

<h2>欢迎来到企业名称</h2>

<p>这里是一段简短的介绍文字。</p>

</div>

</section>

<!– About Us Section –>

<section id=“about”>

<div class=“container”>

<h2>关于我们</h2>

<p>这里是关于企业的详细介绍。</p>

</div>

</section>

<!– Services Section –>

<section id=“services”>

<div class=“container”>

<h2>我们的服务</h2>

<div class=“service”>

<h3>服务一</h3>

<p>这是服务一的详细描述。</p>

</div>

<div class=“service”>

<h3>服务二</h3>

<p>这是服务二的详细描述。</p>

</div>


讯享网

<div class=“service”>

<h3>服务三</h3>

<p>这是服务三的详细描述。</p>

</div>

</div>

</section>

<!– Contact Section –>

<section id=“contact”>

<div class=“container”>

<h2>联系我们</h2>

<form id=“contactForm”>

<label for=“name”>姓名:</label>

<input type=“text” id=“name” name=“name” required>

<br>

<label for=“email”>邮箱:</label>

<input type=“email” id=“email” name=“email” required>

<br>

<label for=“message”>留言:</label>

<textarea id=“message” name=“message” rows=“5” required></textarea>

<br>

<button type=“submit”>发送</button>

</form>

</div>

</section>

<!– Footer –>

<footer>

<p>© 2023 企业名称. 保留所有权利。</p>

</footer>

</body>

</html>

样式 (styles.css) 示例:

css

复制代码

body {

font-family: Arial, sans-serif;

line-height: 1.6;

margin: 0;

}

.container {

width: 80%;

margin: auto;

overflow: hidden;

}

header {

background: #333;

color: #fff;

padding-top: 30px;

min-height: 70px;

border-bottom: #77aaff 3px solid;

}

header h1 {

float: left;

margin-top: 0;

}

header nav {

float: right;

margin-top: 10px;

}

header nav ul {

margin: 0;

padding: 0;

}

header nav ul li {

display: inline;

}

header nav ul li a {

color: white;

text-decoration: none;

padding: 10px 15px;

}

section {

padding: 20px 0;

}

footer {

background: #333;

color: #fff;

text-align: center;

padding: 10px;

margin-top: 20px;

}

JavaScript (scripts.js) 示例:

javascript

复制代码

\((document).ready(function() {</p> <p>// 表单提交事件处理程序</p> <p>\)(“#contactForm”).on(“submit”, function(event) {

event.preventDefault(); // 阻止默认行为

alert(“感谢您的留言!”);

});

});

这个模板是一个基础的企业网站结构,可以根据需要进行扩展和修改。希望这对你有所帮助!

小讯
上一篇 2025-04-14 20:50
下一篇 2025-04-22 17:16

相关推荐

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