Automatically translated.View original post

Content # 2 in appscript

# Web Site Writing Basics

# google # appscript

How to create 3 slides using HTML, CSS and input radio tags is as follows:

HTML structure

You'll start by creating a core structure in HTML, consisting of a container for encapsulating all slides, slides for each image, and labels that serve as a control button. Using the input type = "radio" tag together with the label allows you to switch images without JavaScript.

• Container: is the main part that covers all elements. Used to determine the size and position of all slides.

• Slides: Each image is placed in a div with the class that slides. Each div is positioned to overlap.

• Navigation: This section contains the input type = "radio" and the label which controls the display of the image. Each input has a unique id, and each label has a for attribute that refers to the id of the input. When the user clicks the label, the corresponding input can be selected and CSS can be used to change the image.

• Input: will be hidden with CSS

• Label: Will be designed to be a point or button that the user can see and click on.

HTML code

HTML

< div class = "slider-container" >

< div class = "slider" >

< input type = "radio" id = "slide1" name = "slider-nav" check >

< input type = "radio" id = "slide2" name = "slider-nav" >

< input type = "radio" id = "slide3" name = "slider-nav" >

< div class = "slides" >

< div class = "slide slide-1" >

< h1 > Slide 1 < / h1 >

< p > Content for first slide < / p >

< / div >

< div class = "slide slide-2" >

< h1 > Slide 2 < / h1 >

< p > Content for Second Slide < / p >

< / div >

< div class = "slide slide-3" >

< h1 > Slide 3 < / h1 >

< p > Content for third slide < / p >

< / div >

< / div >

< / div >

< div class = "dots-nav" >

< label for = "slide1" > < / label >

< label for = "slide2" > < / label >

< label for = "slide3" > < / label >

< / div >

< / div >

CSS code

CSS is an important part of making slides work.

• Positioning: Use position: relative for slider-container and position: absolute for slides so that all images overlap inside the container.

• Hiding Input: Hide input type = "radio" with display: none; or visibility: hidden;

• Visualization: Use opacity: 0; to hide all slides. And when the input is selected with: check pseudoclass, it changes the opacity of the relevant slides to 1.

• Dot Decoration: Design the label to be a circle or dot (dot) and use: check + .slides to change the color of the dot when the slide is selected.

CSS

Body {

Font-family: Arial, sans-serif;

Display: flex;

Justify-content: center;

align-items: center;

Height: 100vh;

Background-color:# f0f0f0;

Margins: 0;

}

.slider-container {

width: 80%;

Max-width: 600px;

Height: 400px;

Position: relative;

Overflow: hidden;

box-shadow: 0 4px 8px rgba (0, 0, 0, 0.2);

Border-radius: 8px;

}

.slider {

width: 100%;

Height: 100%;

Position: relative;

}

.slider input [type = "radio"] {

Display: none;

}

.slides {

width: 100%;

Height: 100%;

Position: relative;

}

. Slide {

width: 100%;

Height: 100%;

Position: absolute;

Top: 0;

Left: 0;

Opacity: 0;

Transition: opacity 0.5s ease-in-out;

Background-color:# fff;

Display: flex;

Flex-direction: column;

Justify-content: center;

align-items: center;

Text-align: center;

padding: 20px;

Box-sizing: border-box;

}

# slide1: checked ~ .slides .slides-1,

# slide2: checked ~ .slides .slides-2,

# slide3: checked: checked ~ .slides .slide-3 {

Opacity: 1;

}

.dots-nav {

Position: absolute;

Bottom: 20px;

Left: 50%;

Transform: translateX (-50%);

Display: flex;

Gap: 10px;

}

.dots-nav label {

width: 12px;

Height: 12px;

Background-color: # cc;

Border-radius: 50%;

Cursor: pointer;

Transition: background-color 0.3s ease;

}

# slide1: checked ~ .dots-nav label [for = "slide1"],

# slide2: checked ~ .dots-nav label [for = "slide2"],

# slide3: checked ~ .dots-nav label [for = "slide3"] {

Background-color: # 333;

}

Further explanation

This code uses CSS sibling combinator (~), which selects the same level address element (sibling) to change the properties of the slide when the corresponding input is selected (: checked). This method makes the slide creation work without writing any JavaScript code, which greatly reduces the complexity of the code.

2025/9/22 Edited to

... Read moreถ้าใครเสิร์ชหา “html to slides” แล้วอยากได้สไลด์ที่ทำงานได้เลยแบบไม่ต้องใช้ JavaScript วิธีที่ฉันใช้บ่อยคือ “radio hack” คือให้ input type="radio" เป็นตัวเก็บสถานะ และใช้ label เป็นปุ่มคลิก (ทำเป็นจุด ๆ ด้านล่างได้) จากนั้นให้ CSS ไปจับสถานะ :checked เพื่อโชว์สไลด์ที่เลือก ทริคสำคัญคือ “โครงสร้าง HTML ต้องวาง input ไว้ก่อน slides” และ selector ใน CSS ต้องถูกต้อง (หลายคนพลาดตรงใส่ช่องว่างผิดตำแหน่ง เช่น #slide1 :checked จะไม่ติด เพราะมันหมายถึงลูกของ #slide1 ไม่ใช่ตัว input เอง) ตัวอย่างโครงสร้างที่ใช้งานง่าย (ย่อให้อ่านง่าย): <div class="slider-container"> <input type="radio" name="slider" id="slide1" checked> <input type="radio" name="slider" id="slide2"> <input type="radio" name="slider" id="slide3"> <div class="slides"> <div class="slide s1">…</div> <div class="slide s2">…</div> <div class="slide s3">…</div> </div> <div class="dots-nav"> <label for="slide1" class="dot"></label> <label for="slide2" class="dot"></label> <label for="slide3" class="dot"></label> </div> </div> CSS หลักที่ทำให้สลับสไลด์ได้: /* ซ่อน radio */ .slider-container input[type="radio"]{ display:none; } /* ซ้อนสไลด์ */ .slide{ position:absolute; inset:0; opacity:0; transition:.5s; } /* แสดงสไลด์ตาม radio ที่ถูกเลือก */ #slide1:checked ~ .slides .s1{ opacity:1; } #slide2:checked ~ .slides .s2{ opacity:1; } #slide3:checked ~ .slides .s3{ opacity:1; } /* ไฮไลต์ dot */ #slide1:checked ~ .dots-nav label[for="slide1"], #slide2:checked ~ .dots-nav label[for="slide2"], #slide3:checked ~ .dots-nav label[for="slide3"]{ background:#333; } จากที่ลองทำเอง ข้อดีคือโค้ดเบา โหลดเร็ว และเหมาะกับงานเล็ก ๆ เช่นสไลด์โปรโมต/พอร์ต/หน้าแนะนำสินค้า แต่ก็มีข้อควรระวังคือเรื่อง “การเข้าถึง (accessibility)” แนะนำเพิ่ม aria-label ให้ label หรือใส่ข้อความซ่อน (sr-only) เพื่อให้คนใช้คีย์บอร์ด/สกรีนรีดเดอร์ใช้งานได้ดีขึ้น ถ้าอยากให้ลื่นขึ้นอีก ฉันชอบเพิ่ม: - .slider-container{ overflow:hidden; border-radius:…; } - ปรับ transition ให้เนียน (ease-in-out) - ตั้งขนาดรูปด้วย object-fit: cover; ถ้าใช้ <img> สรุป: ถ้าตั้ง HTML ให้ถูกลำดับ และใช้ #id:checked ~ ... ให้ตรง สไลด์แบบ “HTML to slides” จะทำงานได้ทันทีโดยไม่ต้องเขียน JavaScript เลย

Related posts

How to Read a Script in 3 Easy Steps
Hi! My name is Kimberly Yates, I’m a professional actor and acting coach to A-List talent. I’d love to chat with you! Comment down below 👇 #acting #actingcoach #learnontiktok #howto #fyp
Kimberly Yates

Kimberly Yates

6 likes

Script Med💜
Peace ✌🏽 & Blessings
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

672 likes

Linked Universe Shifting Script Template Notion
#LinkedUniverse #LegendofZelda #realityshifting #notiontemplate #realityshiftingtemplate
ShiftingToTheFullest

ShiftingToTheFullest

13 likes

Manifestation 101 🖤How to script and manifest LOVE
ready to manifest love? Use scripting as a manifestation tool to get a clear vision of what you want (and don’t want), and more importantly, who is the version of you that is in a happy and healthy relationship. Manifestation is about having a vision and then embodying the version of you tha
Seppy ✨💖🌙

Seppy ✨💖🌙

16 likes

Land Your Next Job with this Script
This answer effectively showcases the candidate's enthusiasm for the role and company, their alignment with the company's values and goals, and their eagerness to apply their education and experiences. It demonstrates their understanding of how their skills and aspirations fit with the oppo
Gurvir Bains

Gurvir Bains

2124 likes

How to cold email recruiters on LinkedIn *script*
Hello everyone! Job market has been tough these days and I wanted to share tips on how you can cold email and reach out to recruiters during your job search. Make it personal by using their name, show interest in their company, and highlight your skills. Finish with a clear ask, like setting up a m
Yun Jung

Yun Jung

19 likes

A social media post from "Wealth Revival Credit Academy" by "Admin Emma Frakes" offering "FREE GAME On how to remove hard inquires from your credit in 48 hours," featuring a pointing finger and rocket emoji.
Script provided below 🥰
Phone Script for Disputing Unauthorized Hard Credit Inquiries Introduction: 1. Greeting: "Hello, my name is [Your Name], and I'm calling regarding my credit report." 2. Purpose: "I need to dispute several unauthorized hard inquiries that have appeared on my credit report."
Coi

Coi

51 likes

Script only 🥰
#script #journal #hobonichi
j o c e l y n🥂

j o c e l y n🥂

48 likes

✨Script Your Way To A Better Life ✨
The Re-Brand starts NOW! Vision Board Cheat Code Skin Type&Condition: Step 1: Plan It Step 2: Organize It Step 3: Build It Step 4 : Work It Step 5 : Live Kt You’re only one moment away from living the life you deserve everyday…. #advice #visionboardideas #visionboard
A LUXURY • LIFESTYLE 👗🧘🏽‍💍

A LUXURY • LIFESTYLE 👗🧘🏽‍💍

3 likes

Some good script work
#fyp #foryou #sacramentotattooartist #tattooartist #gdi916 #gdi_916 #getdown_inkz916 #getdown_inkz9162 #tattoos #makeyourappointment
GetDownInkz916

GetDownInkz916

7 likes

A desk in an office cubicle with a laptop and coffee cup, featuring text overlay 'HOW TO ANSWER: WHY SHOULD WE HIRE YOU?' and 'script included!' to guide job interview responses.
A clean desk with a computer monitor, displaying 'KEYPOINTS' for interview answers: 'HIGHLIGHT YOUR UNIQUE SKILLS AND QUALITIES' and 'PROVIDE CONCRETE EXAMPLES THAT ARE RELEVANT', with an 'EXAMPLE' prompt.
A desk with a notebook, showing an 'EXAMPLE RESPONSE' for the 'Why should we hire you?' interview question. The text provides a template emphasizing technical expertise, interpersonal skills, and passion for the role.
How to answer “Why Hire You?” (Script Included!)
This question “why should we hire you” is a very frequent question that is asked during interviews, whether it is for internships or jobs. Being able to answer this question the right way will set you apart from other applicants. The only way to get better is to keep practicing, but don’t script it
dhillon.diary

dhillon.diary

1194 likes

When the customer goes off script
When a customer goes off script so now everything is messed up. A day in customer service retail! #shop #shopping #clothing #clothes #retail #customerservice #customer #retailproblems #thrift #thrifted #shopsmall #chico #clothingrevivalchico #retailworker #retaillife
Clothing Revival

Clothing Revival

615 likes

EXACT SCRIPT! How To Get Kids Off the TV calmly!
The exact script I use to get my kids off the TV. Real life. No bribes. No yelling. Step by step: 1️⃣ Say their name first. Get connection before correction. 2️⃣ Remind them how long they’ve been watching. 3️⃣ Have them repeat the script: “When I turn off the TV, I say thank you.”
Happy Hubbard’s

Happy Hubbard’s

1734 likes

How to prepare your Elevator Pitch *script include
Hi everyone! Crafting an elevator pitch might seem tough, but it's crucial for acing your next interview. Begin by introducing yourself briefly and showcasing your skills and experiences. Then, customize your pitch to fit the job and company, highlighting how you can help them succeed. Practice
Yun Jung

Yun Jung

10 likes

IMPEACH TRUMP - SCRIPT & NUMBER ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️
I wrote this script to call my government reps and tell them i want trump impeached all i had to do is read it as written to my government representatives in my local district which is easy to look up or call the Washington office @ (202) 225-5546. In numbers we are strong. Script: “I am cal
Jeniel

Jeniel

509 likes

Script med💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

35 likes

Salary Negotiation Script
Negotiating your salary is pretty important. It's not just about the paycheck; it's about ensuring you're fairly compensated for the work you do. Plus, it sets the tone for your future earnings and career growth. Think of it as advocating for yourself in a chill way—it's all about r
Gurvir Bains

Gurvir Bains

117 likes

Script Lettering with RED INK 🩸
#tattoo #tattooartist #script #chicano #714
RockRollG

RockRollG

2167 likes

A stylish woman in sunglasses and a white fluffy top, with text overlay "HOW TO SCRIPT YOUR DREAM LIFE (STEP-BY-STEP)" and "script the life you desire with clarity and confidence," introducing the topic.
Text "STEP 1 – REWIRE YOUR SELF-IDENTITY FIRST" with bullet points on self-image and limiting beliefs, set against a background of a person on a balcony watching a sunset over the ocean.
Text "STEP 2 – SHIFT FROM “WANTING” TO “EMBODYING”" explaining how to write with certainty and embodiment, overlaid on an image of a woman exercising on a Pilates reformer machine.
How to script your dream life step by step
Your words aren’t just descriptions—they’re commands to your reality. 💡 Scripting isn’t about wishful thinking—it’s about aligning your subconscious with your dream life. When you write with certainty, emotion, and clarity, you start moving differently, thinking differently, and making decisions
Luxury Mindset CEO

Luxury Mindset CEO

215 likes

A woman sits at a desk, looking at a laptop, with the text "WORK MEETING SCRIPTS" overlaid. The image promotes tips for leading meetings, featuring the Lemon8 logo and user handle @alex.careerqueen.
An overhead view of a desk with a laptop and keyboard, displaying meeting script phrases for "INTRODUCTION" and "AGENDA SETTING." The text provides examples like greeting attendees and setting discussion goals, with the Lemon8 logo and @alex.careerqueen.
A woman at a desk, looking at a laptop, with meeting script phrases for "PRESENTING" and "ENDING THE MEETING" overlaid. The text includes prompts for presenting ideas and summarizing next steps, featuring the Lemon8 logo and @alex.careerqueen.
Run a work meeting like a GIRLBOSS! ✨*script here*
Taking the lead on projects and meetings is a great way to grow your career! But, if you find yourself limited because you're intimidated by running a meeting or unsure of what you'd say—I got you! Here are some of my favorite phrases to keep a meeting moving with a cohesive flow. -
Alex | Career & Confidence

Alex | Career & Confidence

322 likes

A person takes a mirror selfie in a restroom, with text overlays stating 'elevator pitch = KEY to land internships/jobs' and 'SWIPE for an example ->', emphasizing the importance of elevator pitches for career opportunities.
A laptop on a table with a city skyline background, displaying text defining an elevator pitch as a brief, compelling summary for the 'Tell Me About Yourself' interview question.
A laptop screen shows an example elevator pitch from 'Dhillon', detailing her marketing skills and career aspirations, with additional text advising to 'highlight your value' and 'always end with a call to action'.
how to craft perfect elevator pitch (w/ script)
The most common question you will get asked in interviews is "Tell me about yourself". Here is where your elevator pitch comes in handy. In this post, I help you understand what an elevator pitch is and give an example of one. It's something that takes time and practice but once you
dhillon.diary

dhillon.diary

8 likes

The Man Who Can’t Be Moved - The Script (Cover)
I don’t think I ever got over how good this song is 😭 • • • • • #songwriter #tiktok #themanwhocantbemoved #thescript #cover
Kayla 🎤

Kayla 🎤

2 likes

A Bible page open to Matthew 5:39-45, with verses 44-45 highlighted in pink, emphasizing 'Love your enemies' and praying for those who persecute. Small heart doodles are drawn around the highlighted text, and a 'Lemon8' watermark is visible.
FAV SCRIPT 🌸
#bible #biblerecommendation #explore #fyp
SADE ✨

SADE ✨

233 likes

A person's feet in white sneakers stand on asphalt with a yellow smiley face and a white arrow pointing right. The image features text about interview tips and how to answer "Why should we hire you?" with a "Swipe" prompt.
A person sits at a desk, viewed from behind, working on a computer displaying code. An overlay provides advice on how to approach the "Why should we hire you?" question, focusing on unique qualifications and relevant skills.
A close-up of a white keyboard, a black ball of yarn, and a notebook with a pen. An overlay presents a sample answer for the interview question "Why should we hire you?", highlighting experience, achievements, and skills.
Why should we hire you? - How to answer *script*
Hello everyone! When asked why you should be hired, focus on your unique strengths, experiences, and achievements that align with the role and company culture. Highlight your relevant skills and qualifications, emphasizing how you can contribute value and make a positive impact. Share examples of p
Yun Jung

Yun Jung

49 likes

A woman in a white dress and flower crown stands in a golden field under a blue sky. Overlayed text challenges viewers to counter negative thoughts with three positive ones to 'flip the script'.
Flip the Script
Challenge yourself today: Every time a negative thought creeps in, counter it with three positive ones. Train your mind to see the brighter side and watch how your perspective shifts. Let’s reframe our thoughts together! #MindsetShift #PositiveThinking #FlipTheScript #MentalWellness #SelfGr
Soulphoria

Soulphoria

117 likes

Why should we hire you + SCRIPT INCLUDED
So, when you’re in that big interview and they ask, “Why should we hire you?” – this is your moment to shine! 🌟 you know that this question is coming— so make sure to PRACTICE it over and over again! Here’s why this answer is 💯: 1. It’s specific! You’re not just saying you’re great; you’re sh
Baki Izzat

Baki Izzat

169 likes

A woman holds up a peace sign, looking at the camera, with text overlay asking "SO YOU'RE LEAVING your job?". The image, set in a bedroom, introduces a guide on everything you need to know about resigning, with "lemon8" and "@alex.careerqueen" branding.
A desk with a computer and laptop displays a checklist for resigning from a job. The checklist advises being clear, staying positive, providing two weeks' notice, offering transition help, and preparing for questions about future plans. "lemon8" and "@alex.careerqueen" are visible.
A smiling woman sits on a bed, making a peace sign, with a text bubble overlay providing a script for giving a two-weeks notice. The script emphasizes appreciation for the role and mentor, and outlines the plan to send formal notice and begin transition. "lemon8" and "@alex.careerqueen" are present.
do THIS if you’re leaving your job ➡️ (+ script)
One of the biggest corporate lessons that I've learned is... Don't burn bridges. Especially when leaving a job. Because you never know who will come into your career again—and when. In order to leave your job on good terms, try using this checklist and script 👋 #lemon8partner
Alex | Career & Confidence

Alex | Career & Confidence

25 likes

Script med💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

9 likes

Script Med🍋🙏🏾
#fyp
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

12 likes

Script Med🍋🙏🏾
#fypシ゚viral
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

13 likes

See more