Using GPT4 Vision to convert this image to instructions on making a simple static HTML website
ME: Please convert this creative website layout into HTML and CSS code. Each building and label should be its own element with hover effects, and hyperlink to a URL
CHATGPT:
To create a webpage based on the provided image, we would first slice the image into separate images for each building and label. Then, we would use CSS to position these images on a webpage and add hover effects and hyperlinks.
However, I can't slice the image for you directly here, but I can provide you with a general guideline and example code to help you achieve this.
Image Slicing:
Use an image editor (like Photoshop, GIMP, or any online image editor) to slice the provided image into separate images for each building and label.
HTML & CSS:
Here's an example structure and style for two buildings. You can replicate this for all the other buildings:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Layout</title>
<style>
body {
background: url('path-to-background-image.jpg') no-repeat;
width: 100%;
height: 100vh;
margin: 0;
overflow: hidden;
position: relative;
}
.building {
position: absolute;
transition: transform 0.3s;
}
.building:hover {
transform: scale(1.05);
cursor: pointer;
}
.mcdonalds-shop {
top: 210px;
left: 150px;
width: 100px;
height: 100px;
background: url('path-to-mcdonalds-shop-image.png') no-repeat;
}
.petpet-shop {
top: 50px;
left: 50px;
width: 100px;
height: 100px;
background: url('path-to-petpet-shop-image.png') no-repeat;
}
</style>
</head>
<body>
<a href="mcdonalds-shop-url" class="building mcdonalds-shop"></a>
<a href="petpet-shop-url" class="building petpet-shop"></a>
<!-- ... add other buildings similarly ... -->
</body>
</html>
Notes:
path-to-background-image.jpg
, path-to-mcdonalds-shop-image.png
, and path-to-petpet-shop-image.png
with actual paths to your sliced images.<a>
) tag.For quick mockup can search sketchfab or clip art for the various assets, or use https://www.bing.com/images/create for sticker art. You can drag and drop the glb into https://playcanvas.com/viewer and download the png to get a nice shadow + transparent png.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing