Interactive Design Exercise 2:Creating a Recipe Card
HTML and CSS Exercises This week, we were asked to do an HTML exercise.
Let's use Notepad for the first exercise.
On this website, I have chosen "Tofu Scramble".The link of this website:Tofu Scramble - 101 Cookbooks
HTML development
I organized HTML into different sections:
a) Navigation bar
b) Dish images
c) Ingredient preparation
d)Production process
e)Comments
f)Cooking Tips
g) About Tofu Scramble
h) Information bar
HTML code
Webpage CSS
Font Selection
- Sans-serif font (Arial as the first choice, sans-serif as the fallback)
Color System
- Text and Title Colors: #333, #8b4513, #b85c38
- Background Colors: #f9f5ea, #f8f3e6, #f0e6d2, #8b4513, #f1c933
Website link: Delicious Tofu Scramble Recipe
I. Navigation Bar Design
Style: Use a dark background (#8b4513) with white text, and apply border-radius: 8px.
Layout: Utilize the flex layout with justify-content: center and gap: 25px to center
and evenly distribute the navigation links on the page.
Interaction: Add a hover effect to the links (changing the background color to
#b85c38`), and achieve a smooth transition through transition: background-color 0.3s
to enhance the user's interaction perception.
II. Image Display Design
Single Image Display: The main image is made to adapt to the container through
max-width: 100% and object-fit: covermaintaining the aspect ratio of the image.
border-radius and box-shadow are used to enhance the visual depth.
Using flex layout with flex-wrap: wrap and justify-content: center, a responsive
gallery is achieved. Each image is set to a fixed size (280px × 200px) and ensures the
image is complete through object-fit: cover.
III. Content Block Design
Card-style layout: recipe-card` is centered using max-width, margin: 0 auto,
background-color: white, border-radius: 12px, and box-shadow
List style: The ingredient list (ingredient-list) and the step list (#instructions) are
differentiated by background color and left border (e.g., border-left: 4px solid #f1c933)
IV. Multi-column Layout Design
Three-column layout is achieved using float: left and box-sizing: border-box, and
column contents are distinguished by different background colors (bgdark and
bglight)
V. Form Design
The form container uses background-color and border-radius, labels (label) are
aligned using inline-block and fixed width, input boxes (input, textarea)
VI. Text and Color Design
Color Scheme: The main color is chosen as (#8b4513, #b85c38), with an auxiliary
color of (#f9f5ea) (such as #f1c933)
Text Layout: The line-height and margin-bottom properties are used to ensure
readability of the text. Titles and body text are in different colors ( h1 is #8b4513,
and the body text is #333)
figma1.1Navigation bar and image display area
figma1.2Ingredient preparation and Production process
figma1.3Comments and Cooking Tips and About Tofu Scramble
figma1.4 Information bar
Comments
Post a Comment