Styling the Photos & Text
Master modern CSS3 techniques for responsive image styling
This tutorial requires Chrome, Safari, Firefox, or Internet Explorer 10+. Internet Explorer 9 and older do not support all CSS3 features covered.
Key CSS3 Features You'll Learn
Fixed Background Images
Create sticky background effects where images remain static while text scrolls over them using background-attachment properties.
Responsive Image Scaling
Implement background-size: cover to ensure images scale perfectly across all device sizes and maintain aspect ratios.
CSS3 Animations
Build smooth transitions, zoom effects, and panoramic scrolling using modern CSS animation capabilities.
Project Setup Process
Open Browser
Launch Chrome, Safari, Firefox, or IE 10+ to view the completed example at Desktop > Class Files > Responsive CSS3 Scrolling Effects > Hawaii Done > index.html
Launch Code Editor
Open your preferred editor (Sublime Text, Atom, Dreamweaver) and load the project files from the Hawaii folder
Verify Viewport Meta Tag
Confirm line 8 contains the required viewport meta tag for proper mobile responsive behavior
The starter template already includes a max-width of 1000 pixels for the main text column, preventing lines from becoming too long while allowing narrower displays on small screens.
We'll create div tags for images instead of using img tags because we want the images to do various things such as animate or stay fixed as we scroll
DIV vs IMG for Advanced Styling
Custom fonts from Google Fonts are already loaded in this project. For your own projects, visit fonts.google.com to explore and implement web fonts.
CSS3 Text Enhancement Features
Text Shadow Effects
Use text-shadow with RGBA values for subtle shadows that improve readability over background images. The syntax includes offset, blur, and transparency.
Percentage-Based Margins
Implement responsive spacing using percentage margins that adapt to different screen sizes automatically for optimal layout balance.
CSS3 Text Shadow Breakdown
Position Offsets
First two values (0 4px) control X and Y offset. Zero centers the shadow, 4px moves it down slightly
Blur Radius
Third value controls shadow blur size. Larger numbers create softer, more diffused shadows
Color and Transparency
RGBA(0,0,0,0.5) creates a black shadow at 50% transparency for subtle depth without overwhelming the text
The panorama section automatically inherits background-size: cover and static scrolling behavior from the .photo class, requiring only specific properties to be defined.
Photo Stack Implementation
Each section will occupy full screen height as users scroll
Descriptive text overlays enhance user engagement
Maintains visual cohesion across all stack elements
Ensures optimal display on mobile and desktop devices
Key Takeaways
