用js写一个售楼网站介绍
时间: 2024-06-08 13:06:53 浏览: 13
好的,下面是一个简单的售楼网站介绍的JS代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>售楼网站介绍</title>
<meta charset="utf-8">
<style type="text/css">
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
font-size: 36px;
margin-bottom: 20px;
text-align: center;
}
h2 {
font-size: 24px;
margin-top: 40px;
margin-bottom: 10px;
}
p {
font-size: 16px;
line-height: 1.5;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.btn:hover {
background-color: #0069d9;
}
.img-container {
margin-top: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.img-container img {
max-width: 100%;
max-height: 300px;
object-fit: contain;
}
</style>
</head>
<body>
<div class="container">
<h1>欢迎来到售楼网站</h1>
<p>我们是一家专业的房地产公司,为您提供优质的售楼服务。</p>
<h2>我们的服务项目</h2>
<ul>
<li>住宅销售</li>
<li>商业地产销售</li>
<li>土地开发</li>
<li>物业管理</li>
<li>房屋租赁</li>
</ul>
<h2>我们的优势</h2>
<ul>
<li>多年的房地产销售经验</li>
<li>全方位的售后服务</li>
<li>专业的团队和技术支持</li>
<li>优质的房源和价格优势</li>
</ul>
<div class="img-container">
<img src="https://cdn.pixabay.com/photo/2017/08/07/01/19/apartment-2599501_960_720.jpg" alt="房地产图片">
</div>
<p>如果您有任何关于房地产的需求,请不要犹豫,立即联系我们!</p>
<button class="btn">联系我们</button>
</div>
<script type="text/javascript">
var btn = document.querySelector('.btn');
btn.addEventListener('click', function() {
alert('请拨打我们的热线电话:1234567890');
});
</script>
</body>
</html>
```
这个JS代码示例实现了一个简单的售楼网站介绍页面,包括了网站的基本信息、服务项目、优势、房地产图片以及联系方式等。
你可以将代码复制到一个HTML文件中,然后在浏览器中打开该文件,即可看到网站页面效果。