Style="text-transform: uppercase"

本文介绍了如何通过简单的HTML输入框实现小写字母转大写的功能,包括样式设置和基本的JavaScript操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<input name="validate" type="text" id="vdcode2" class="ipt-txt" style="width:60px;text-transform: uppercase;" />

 

可以将输入到文本框中的小写字母转换成大写字母

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>彼岸花开</title> <style> body { margin: 0; padding: 0; font-family: 'Poppins', sans-serif; height: 1000px; } .banner { width: 100%; height: 100vh; overflow: hidden; display: flex; justify-content: center; align-items: center; } .banner video { position: absolute; top: 0; left: 0; object-fit: cover; width: 100%; height: 100%; pointer-events: none; } .banner .content { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; text-align: center; } .banner .content h1 { margin: 0; padding: 0; font-size: 3.5em; text-transform: uppercase; color: #d11090; } .banner .content p { font-size: 1.5em; color: #fff; } h1::after { content: ''; position: absolute; top: 0; left: 0; color: transparent; background-image: linear-gradient(to right, #c23616, #192a56, #00d2d3, yellow, #6d214f, #2e86de, #4cd137, #e84118); background-clip: text; -webkit-background-clip: text; clip-path: circle(100px at 0% 50%); animation: move 5s infinite; } @keyframes move { 0% { clip-path: circle(100px at 0% 50%); transform: translateX(0); } 50% { clip-path: circle(100px at 100% 50%); transform: translateX(10px); } 100% { clip-path: circle(100px at 0% 50%); transform: translateX(0); } } </style> </head> <body> <div class="banner"> <video autoplay loop muted> <source src="flower.mp4" type="video/mp4" controls> <!-- <audio src="./Christmas.mp3" autoplay="autoplay" loop></audio>--> </video> <div class="content"> <h1></h1> </div> </div> </body> </html>
06-11
请帮我调整该vue项目下的响应式,使其网页设计的可以像香格里拉酒店官网中“餐厅与酒吧”页面的效果:<template> <!-- 体验页面 --> <div class="experience"> <!-- 顶部导航栏 --> <NavBar /> <div class="container"> <!-- 首图内容区域 --> <div class="content-banner"></div> <div class="content-wrapper"> <!-- 商务之旅 --> <div class="business"> <div class="img-box"> <responsive-image class="hd01" :small-image="hd01.smallImage1" :medium-image="hd01.mediumImage1" :large-image="hd01.largeImage1" alt-text="Business trip" /> </div> <div class="text-box"> <p class="title" :class="{ textEn: $i18n.locale === 'en' }">{{ $t('Business') }}</p> <p class="content" :class="{ textEn: $i18n.locale === 'en' }"> {{ $t('text7') }} </p> <p class="more" :class="{ textEn: $i18n.locale === 'en' }"> {{ $t("more14") }} </p> </div> </div> <!-- 旅游度假 --> <div class="tourism"> <div class="text-box"> <p class="title" :class="{ textEn: $i18n.locale === 'en' }">{{ $t('trip') }}</p> <p class="content" :class="{ textEn: $i18n.locale === 'en' }"> {{ $t('text8') }} </p> <p class="more" :class="{ textEn: $i18n.locale === 'en' }"> {{ $t("more15") }} </p> </div> <div class="img-box"> <responsive-image class="hd02" :small-image="hd02.smallImage2" :medium-image="hd02.mediumImage2" :large-image="hd02.largeImage2" alt-text="Vacation" /> </div> </div> </div> <!-- 查看客房 --> <div class="content-swiper"> <div class="content-kefang"> <p class="title" :class="{ textEn: $i18n.locale === 'en' }">{{ $t('Guest') }}</p> <div class="foot-swiper-box"> <RoomSwiper :bannerList="roomBannerList" /> </div> </div> <div class="content-kefang"> <p class="title" :class="{ textEn: $i18n.locale === 'en' }">{{ $t('Apartment') }}</p> <div class="foot-swiper-box"> <RoomSwiper :bannerList="apartBannerList" /> </div> </div> <div class="device"> <p class="title" :class="{ textEn: $i18n.locale === 'en' }">{{ $t('Facilities') }}</p> <div class="device-content"> <div class="img-box"> <responsive-image :small-image="facilities.smallImage" :medium-image="facilities.mediumImage" :large-image="facilities.largeImage" alt-text="Facilities" /> </div> <div class="text-box"> <ul class="device-list"> <li class="text" v-for="(item, index) in facilityItems" :key="index" :class="{ textEn: $i18n.locale === 'en' }"> {{ $t(item) }} </li> </ul> </div> </div> </div> </div> </div> <!-- 底部导航栏 --> <Footer /> </div> </template> <script> import RoomSwiper from "@/components/swiper/RoomSwiper.vue"; export default { name: "Experience", components: { RoomSwiper, }, data() { return { facilityItems: ['WiFi', 'individually', 'TV', 'laundry', 'safes', 'coffee', 'Minibar'], facilities: { smallImage: require("../../assets/experience/facilities-mobile.jpg"), mediumImage: require("../../assets/experience/facilities-tablet.jpg"), largeImage: require("../../assets/experience/facilities-desktop.jpg") }, hd01: { smallImage1: require("../../assets/experience/hd-01-mobile.jpg"), mediumImage1: require("../../assets/experience/hd-01-tablet.jpg"), largeImage1: require("../../assets/experience/hd-01-desktop.jpg"), }, hd02: { smallImage2: require("../../assets/experience/hd-02-mobile.jpg"), mediumImage2: require("../../assets/experience/hd-02-tablet.jpg"), largeImage2: require("../../assets/experience/hd-02-desktop.jpg"), }, roomBannerList: [ // 保持原有数据 ], apartBannerList: [ // 保持原有数据 ], }; }, }; </script> <style scoped> /* 基础样式 */ .experience { font-family: 'Helvetica Neue', Arial, sans-serif; color: #333; background: #f9f9f9; } .content-banner { width: 100%; height: 80vh; max-height: 800px; background-image: url("../../assets/banner/banner-02-desktop.jpg"); background-size: cover; background-position: center; } .container { max-width: 1440px; margin: 0 auto; padding: 0 20px; } .title { font-size: 2.8rem; color: #c9aa62; /* 香槟金色 */ font-weight: 300; letter-spacing: 1px; margin-bottom: 1.5rem; position: relative; padding-bottom: 10px; } .title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 2px; background: #c9aa62; } .text-box { padding: 2rem; } .content { font-size: 1.6rem; line-height: 1.8; color: #555; margin-bottom: 2rem; } .more { display: inline-block; font-size: 1.6rem; color: #c9aa62; text-decoration: none; border-bottom: 1px solid #c9aa62; padding-bottom: 5px; transition: all 0.3s; } .more:hover { color: #a88c4a; border-color: #a88c4a; } /* 布局样式 */ .business, .tourism { display: flex; align-items: center; margin: 8rem 0; } .img-box { flex: 1; overflow: hidden; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); } .img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; } .img-box:hover img { transform: scale(1.03); } .text-box { flex: 1; padding: 0 4rem; } /* 设备区域 */ .device-content { display: flex; align-items: center; gap: 5rem; margin-top: 5rem; } .device-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; list-style: none; padding: 0; } .device-list li { position: relative; padding-left: 2.5rem; font-size: 1.6rem; line-height: 1.8; } .device-list li::before { content: '•'; position: absolute; left: 0; color: #c9aa62; font-size: 2rem; } /* 响应式调整 */ @media (max-width: 1200px) { .business, .tourism { margin: 6rem 0; } .device-content { gap: 3rem; } } @media (max-width: 992px) { .content-banner { height: 60vh; } .business, .tourism { flex-direction: column; gap: 3rem; } .tourism .text-box { order: -1; } .device-content { flex-direction: column; } .img-box { width: 100%; height: 400px; } } @media (max-width: 768px) { .content-banner { height: 50vh; background-image: url("../../assets/banner/banner-02-mobile.jpg"); } .title { font-size: 2.4rem; } .content { font-size: 1.4rem; } .device-list { grid-template-columns: 1fr; } .img-box { height: 300px; } .text-box { padding: 0 2rem; } } @media (max-width: 576px) { .content-banner { height: 40vh; } .title { font-size: 2rem; } .img-box { height: 250px; } } .textEn { font-family: 'Times New Roman', Times, serif; font-weight: 400; letter-spacing: 0.5px; } .content-kefang { margin: 8rem 0; } .foot-swiper-box { margin-top: 3rem; } </style>
06-14
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> /* 轻奢风格基础设置 */ :root { --gold: #D4AF37; --light-gold: #E6D29E; --dark: #333333; --light: #F9F7F5; --gray: #E0E0E0; } .luxury-process { font-family: 'Helvetica Neue', Arial, sans-serif; max-width: 1200px; margin: 0 auto; padding: 40px 20px; background-color: var(--light); position: relative; overflow: hidden; } /* 装饰性元素 */ .luxury-process::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--gold), transparent); z-index: 1; } .section-title { text-align: center; margin-bottom: 60px; position: relative; } .section-title h2 { font-size: 2.2rem; font-weight: 300; letter-spacing: 2px; color: var(--dark); text-transform: uppercase; margin-bottom: 15px; } .section-title::after { content: ""; display: block; width: 80px; height: 2px; background: var(--gold); margin: 0 auto; } /* 流程容器 */ .process-container { display: flex; justify-content: space-between; position: relative; } /* 连接线 */ .process-container::before { content: ""; position: absolute; top: 80px; left: 10%; width: 80%; height: 1px; background: var(--gray); z-index: 0; } /* 单个步骤样式 */ .process-step { flex: 1; text-align: center; padding: 0 20px; position: relative; z-index: 2; transition: all 0.4s ease; } .step-icon { width: 160px; height: 160px; margin: 0 auto 25px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(0,0,0,0.05); border: 1px solid var(--gray); overflow: hidden; transition: all 0.4s ease; } .step-icon img { width: 70%; height: auto; object-fit: contain; transition: transform 0.3s ease; } .step-content { padding: 0 15px; } .step-number { display: inline-block; width: 36px; height: 36px; line-height: 36px; background: var(--gold); color: white; border-radius: 50%; margin-bottom: 15px; font-weight: 300; } .step-title { font-size: 1.2rem; font-weight: 500; color: var(--dark); margin-bottom: 15px; letter-spacing: 1px; } .step-desc { font-size: 0.95rem; line-height: 1.7; color: #666; font-weight: 300; } /* 悬停效果 */ .process-step:hover { transform: translateY(-10px); } .process-step:hover .step-icon { box-shadow: 0 12px 30px rgba(212, 175, 55, 0.2); border-color: var(--light-gold); } .process-step:hover .step-icon img { transform: scale(1.05); } .process-step:hover .step-number { background: var(--dark); } /* 响应式设计 */ @media (max-width: 768px) { .process-container { flex-direction: column; } .process-container::before { display: none; } .process-step { margin-bottom: 40px; display: flex; align-items: center; text-align: left; } .step-icon { min-width: 100px; width: 100px; height: 100px; margin: 0 20px 0 0; } .step-content { padding: 0; } .step-number { position: absolute; top: 10px; left: 45px; } } </style> </head> <body> <!-- 流程模块开始 --> <div class="luxury-process"> <div class="section-title"> <h2>尊享服务流程</h2> </div> <div class="process-container"> <!-- 步骤 1 --> <div class="process-step"> <div class="step-icon"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE5IDNINUMzLjkgMyAzIDMuOSAzIDV2MTRjMCAxLjEgLjkgMiAyIDJoMTRjMS4xIDAgMi0uOSAyLTJWNWMwLTEuMS0uOS0yLTItMnptMCAxNkg1VjVoMTR2MTR6TTcgMTBoMTB2Mkg3em0wIDRoMTB2Mkg3eiIvPjwvc3ZnPg==" alt="咨询"> </div> <div class="step-content"> <span class="step-number">1</span> <h3 class="step-title">需求咨询</h3> <p class="step-desc">专业顾问一对一沟通,深入了解您的需求与期望,提供个性化解决方案。</p> </div> </div> <!-- 步骤 2 --> <div class="process-step"> <div class="step-icon"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE5IDMuOWMtMS4xIDAtMi4xLjQtMi44IDEuMkwxMiA4LjFsLTQuMi0zLjlDNi45IDMuNCA1LjkgMyA0LjggM0MzLjMgMyAyIDQuMyAyIDUuOHYxMi40YzAgMS41IDEuMyAyLjggMi44IDIuOGgxMi40YzEuNSAwIDIuOC0xLjMgMi44LTIuOFY1LjhjMC0xLjUtMS4zLTIuOC0yLjgtMi45em0wIDE1LjJINC44VjUuOGgxNC40djEzLjN6Ii8+PHBhdGggZD0iTTE2LjIgOS43bC0xLjQtMS40LTQuMiA0LjItMS44LTEuOC0xLjQgMS40IDMuMiAzLjJ6Ii8+PC9zdmc+" alt="设计"> </div> <div class="step-content"> <span class="step-number">2</span> <h3 class="step-title">方案设计</h3> <p class="step-desc">设计师团队精心构思,融合现代美学与实用功能,打造专属设计方案。</p> </div> </div> <!-- 步骤 3 --> <div class="process-step"> <div class="step-icon"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE5IDRINWMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0tMiAxNEg3VjhoMTB2MTB6Ii8+PHBhdGggZD0iTTE1IDEwaDJ2MmgtMnpNMTUgMTNoMnYyaC0yek0xMCAxMGgzdjNIMTB6TTcgMTBoMnYySDd6TTcgMTNoMnYySDd6Ii8+PC9zdmc+" alt="实施"> </div> <div class="step-content"> <span class="step-number">3</span> <h3 class="step-title">专业实施</h3> <p class="step-desc">经验丰富的执行团队精密施工,确保每个细节完美呈现,品质严格把控。</p> </div> </div> <!-- 步骤 4 --> <div class="process-step"> <div class="step-icon"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iIzMzMyI+PHBhdGggZD0iTTE3IDNoLTRjLS41NSAwLTEgLjQ1LTEgMXYxLjI5Yy0uNjkuMzUtMS4yNi44OC0xLjY4IDEuNTVsLTEuOTQtMS45NC0uNzEuNzEgMS45NCAxLjk0QzkuMDQgOC4xNCA5IDguMzIgOSA4LjVjMCAxLjEuOSAyIDIgMnMxLjktLjkgMi0yYzAtLjE4LS4wNC0uMzYtLjExLS41Mmw1LjE4IDUuMThjLS4xNi4wNy0uMzQuMTEtLjUyLjExLS41NSAwLTEtLjQ1LTEtMXYtMi41OWwtMi0yVjE4YzAgLjU1LjQ1IDEgMSAxaDRjLjU1IDAgMS0uNDUgMS0xdi0xLjI5Yy42OS0uMzUgMS4yNi0uODggMS42OC0xLjU1bDEuOTQgMS45NC43MS0uNzEtMS45NC0xLjk0Yy4wNy0uMTguMTEtLjM2LjExLS41NCAwLTEuMS0uOS0yLTItMi0uNTUgMC0xIC40NS0xIDF2Mi41OWwyIDJWNGMwLS41NS0uNDUtMS0xLTF6Ii8+PC9zdmc+" alt="交付"> </div> <div class="step-content"> <span class="step-number">4</span> <h3 class="step-title">完美交付</h3> <p class="step-desc">全面质量检测,专属交付仪式,提供持续维护支持,确保长期满意体验。</p> </div> </div> </div> </div> <!-- 流程模块结束 --> </body> </html> 把这段代码改成黑白灰色调的轻奢简约风格,不需要背景颜色
最新发布
06-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值