菜单
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

ChatGPT-3.5 代码网站


使用 ChatGPT-3.5 创建网站

使用 ChatGPT-3.5 创建网站就像身边有一位网页开发人员为您提供帮助。

ChatGPT 可以帮助您入门!


写下您的想法

在使用生成式 AI 帮助之前,您必须弄清楚网站需要包含什么内容。

一些需要考虑的步骤

  • 网站是关于什么的?
  • 您想要图片吗?
  • 您需要联系信息吗?

您提供的细节越多,ChatGPT 的表现就越好。


生成网站代码

在我们的示例中,我们将要求 ChatGPT 创建一个简单的网页

示例

使用以下提示

创建一个简单的网页,包含我的纸杯蛋糕业务名称“Magically Delicious”,简短的描述,几张图片,以及我的联系方式(Genevieve Lavorre,电子邮件:lavorre@tmn.com)。

ChatGPT-3.5 的响应可能是

让我们来测试一下代码:(我们使用 Midjourney 生成了 3 张图片)

示例

<!DOCTYPE html>
<html>
<head>
  <title>Magically Delicious Cupcakes</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 20px;
    }
    h1 {
      text-align: center;
    }
    .description {
      text-align: center;
      margin-bottom: 30px;
    }
    .contact-details {
      text-align: center;
      margin-top: 30px;
    }
    .contact-details p {
      margin: 10px 0;
    }
    .image-gallery {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }
    .image-gallery img {
      width: 250px;
      margin: 10px;
    }
  </style>
</head>
<body>
  <h1>Welcome to Magically Delicious Cupcakes!</h1>
  
  <div class="description">
    <p>Indulge in the enchantment of our delectable cupcakes.</p>
    <p>We offer a wide variety of flavors and designs to satisfy your sweet tooth and bring magic to your taste buds.</p>
  </div>
  
  <div class="image-gallery">
    <img src="img_cupcake1.png" alt="Cupcake 1">
    <img src="img_cupcake2.png" alt="Cupcake 2">
    <img src="img_cupcake3.png" alt="Cupcake 3">
  </div>
  
  <div class="contact-details">
    <p>Contact us for orders or inquiries:</p>
    <p>Name: Genevieve Lavorre</p>
    <p>Email: <a href="mailto:lavorre@tmn.com">lavorre@tmn.com</a></p>
  </div>
</body>
</html>
自己动手试一试 »

看起来不错!


审查代码并迭代

回顾 ChatGPT 的响应,这是一个不错的起点。

让我们寻求更多帮助

示例

使用以下提示

让页面看起来更好

ChatGPT-3.5 的响应可能是

让我们来测试一下代码

示例

<!DOCTYPE html>
<html>
<head>
  <title>Magically Delicious Cupcakes</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 20px;
      background-color: #f7f7f7;
    }
    h1 {
      text-align: center;
      color: #442d6c;
      font-size: 36px;
      margin-bottom: 30px;
    }
    .description {
      text-align: center;
      margin-bottom: 30px;
    }
    .description p {
      font-size: 18px;
      color: #555555;
      line-height: 1.5;
      margin-bottom: 10px;
    }
    .contact-details {
      text-align: center;
      margin-top: 30px;
    }
    .contact-details p {
      font-size: 16px;
      color: #555555;
      margin: 5px 0;
    }
    .image-gallery {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }
    .image-gallery img {
      width: 300px;
      margin: 10px;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    a {
      color: #442d6c;
    }
    a:hover {
      color: #800080;
    }
  </style>
</head>
<body>
  <h1>Welcome to Magically Delicious Cupcakes!</h1>
  
  <div class="description">
    <p>Indulge in the enchantment of our delectable cupcakes.</p>
    <p>We offer a wide variety of flavors and designs to satisfy your sweet tooth and bring magic to your taste buds.</p>
  </div>
  
  <div class="image-gallery">
    <img src="img_cupcake1.png" alt="Cupcake 1">
    <img src="img_cupcake2.png" alt="Cupcake 2">
    <img src="img_cupcake3.png" alt="Cupcake 3">
  </div>
  
  <div class="contact-details">
    <p>Contact us for orders or inquiries:</p>
    <p>Name: Genevieve Lavorre</p>
    <p>Email: <a href="mailto:lavorre@tmn.com">lavorre@tmn.com</a></p>
  </div>
</body>
</html>
自己动手试一试 »

这是一个非常简单的页面,但如此快速地开始可以节省大量时间。


×

联系销售

如果您想将 W3Schools 服务用于教育机构、团队或企业,请发送电子邮件给我们
sales@w3schools.com

报告错误

如果您想报告错误,或想提出建议,请发送电子邮件给我们
help@w3schools.com

W3Schools 经过优化,旨在方便学习和培训。示例可能经过简化,以提高阅读和学习体验。教程、参考资料和示例会不断审查,以避免错误,但我们无法保证所有内容的完全正确性。使用 W3Schools 即表示您已阅读并接受我们的使用条款Cookie 和隐私政策

版权所有 1999-2024 Refsnes Data。保留所有权利。W3Schools 由 W3.CSS 提供支持