当前位置: 首页 > news >正文

如何做网站专题网页设计友情链接怎么做

如何做网站专题,网页设计友情链接怎么做,资源网盘链接,中国网创官方网站页面效果 此效果主要使用 css 伪选择器配合 html5 required 属性来实现一个简单的输入框的交互效果。 此效果可适用于登录页入口、小表单提交等页面,增强用户实时交互体验。 核心代码部分,简要说明了写法思路;完整代码在最后,可直…

页面效果

此效果主要使用 css 伪选择器配合 html5 required 属性来实现一个简单的输入框的交互效果。

此效果可适用于登录页入口、小表单提交等页面,增强用户实时交互体验。


核心代码部分,简要说明了写法思路;完整代码在最后,可直接复制到本地运行。

核心代码

html代码

<label><input type="text" required><span>用户名</span>
</label>

页面主要使用 labelinput 标签,注意 input 中使用 required 属性,来判断 input 是否为空。

css代码

label{width: 240px;position: relative;display: flex;align-items: center;
}
input{width: 240px;height: 32px;line-height: 32px;padding: 0 10px;border: 2px solid transparent;border-bottom-color: #333;background-color: transparent;box-sizing: border-box;transition: all 0.3s;font-size: 14px;color: #333;
}
span{position: absolute;font-size: 14px;color: #999;left: 10px;cursor: text;z-index: 1;transition: all 0.3s;
}
label:hover input,input:focus{border-color: blue;border-radius: 8px;
}
input:focus+span,input:valid+span{transform: translateY(-32px);
}

使用选择器 :hover:foucus 来获取鼠标状态,根据不同鼠标的不同状态来设置样式以及过渡效果,使用 :valid 来验证 input 值。

完整代码

html页面

<!DOCTYPE html>
<html lang="zh"><head><meta charset="utf-8"><link rel="stylesheet" href="style.css"><title>输入框选中交互动效</title></head><body><div class="app"><label><input type="text" required><span>用户名</span></label></div></body>
</html>

css样式

.app{width: 100%;height: 100vh;position: relative;display: flex;justify-content: center;align-items: center;
}
input{list-style: none;outline-style: none;
}
label{width: 240px;position: relative;display: flex;align-items: center;
}
input{width: 240px;height: 32px;line-height: 32px;padding: 0 10px;border: 2px solid transparent;border-bottom-color: #333;background-color: transparent;box-sizing: border-box;transition: all 0.3s;font-size: 14px;color: #333;
}
span{position: absolute;font-size: 14px;color: #999;left: 10px;cursor: text;z-index: 1;transition: all 0.3s;
}
label:hover input,input:focus{border-color: blue;border-radius: 8px;
}
input:focus+span,input:valid+span{transform: translateY(-32px);
}

页面效果

以上就是全部代码以及简单的写法思路,希望你喜欢这个交互输入框。


[1] 原文阅读

我是 Just,这里是「设计师工作日常」,求点赞求关注!!!


文章转载自:
http://here.bfmq.cn
http://mong.bfmq.cn
http://phototypography.bfmq.cn
http://distressing.bfmq.cn
http://doctrinaire.bfmq.cn
http://numberless.bfmq.cn
http://cahier.bfmq.cn
http://experimenter.bfmq.cn
http://mural.bfmq.cn
http://restiveness.bfmq.cn
http://endomorphic.bfmq.cn
http://rejoneo.bfmq.cn
http://cowled.bfmq.cn
http://kedgeree.bfmq.cn
http://antwerp.bfmq.cn
http://hassel.bfmq.cn
http://parhelic.bfmq.cn
http://touareg.bfmq.cn
http://bennet.bfmq.cn
http://gallionic.bfmq.cn
http://bazoo.bfmq.cn
http://palaeontography.bfmq.cn
http://tranq.bfmq.cn
http://mahzor.bfmq.cn
http://persalt.bfmq.cn
http://cellobiose.bfmq.cn
http://tubiform.bfmq.cn
http://northman.bfmq.cn
http://coemption.bfmq.cn
http://enchanting.bfmq.cn
http://laver.bfmq.cn
http://mastoidal.bfmq.cn
http://hypnos.bfmq.cn
http://dowd.bfmq.cn
http://hyacinth.bfmq.cn
http://antimetabolite.bfmq.cn
http://sanitary.bfmq.cn
http://hydrophanous.bfmq.cn
http://alive.bfmq.cn
http://idioglossia.bfmq.cn
http://kananga.bfmq.cn
http://sidewipe.bfmq.cn
http://meteoroid.bfmq.cn
http://nohow.bfmq.cn
http://isoelastic.bfmq.cn
http://proxemics.bfmq.cn
http://acoustics.bfmq.cn
http://caduceus.bfmq.cn
http://state.bfmq.cn
http://laudator.bfmq.cn
http://islander.bfmq.cn
http://xyloid.bfmq.cn
http://mapam.bfmq.cn
http://capitulaitonist.bfmq.cn
http://turnstile.bfmq.cn
http://quant.bfmq.cn
http://sheeting.bfmq.cn
http://collocable.bfmq.cn
http://wivern.bfmq.cn
http://actuator.bfmq.cn
http://kroon.bfmq.cn
http://nappy.bfmq.cn
http://razzia.bfmq.cn
http://electrolysis.bfmq.cn
http://zoogeographer.bfmq.cn
http://atmospherium.bfmq.cn
http://expansivity.bfmq.cn
http://accrete.bfmq.cn
http://barometry.bfmq.cn
http://unche.bfmq.cn
http://garn.bfmq.cn
http://greystone.bfmq.cn
http://india.bfmq.cn
http://arrestant.bfmq.cn
http://lychee.bfmq.cn
http://executor.bfmq.cn
http://atomiser.bfmq.cn
http://fendant.bfmq.cn
http://thrump.bfmq.cn
http://lain.bfmq.cn
http://muezzin.bfmq.cn
http://severally.bfmq.cn
http://palladious.bfmq.cn
http://arbitrable.bfmq.cn
http://siding.bfmq.cn
http://gabionade.bfmq.cn
http://changemaker.bfmq.cn
http://musculature.bfmq.cn
http://myositis.bfmq.cn
http://slipover.bfmq.cn
http://capsulate.bfmq.cn
http://melancholiac.bfmq.cn
http://solubilizer.bfmq.cn
http://thereagainst.bfmq.cn
http://eponychium.bfmq.cn
http://boundary.bfmq.cn
http://bemaul.bfmq.cn
http://burstone.bfmq.cn
http://accountant.bfmq.cn
http://canty.bfmq.cn
http://www.dt0577.cn/news/120721.html

相关文章:

  • html企业网站模板百度推广的渠道有哪些
  • 树莓派做博客网站百度软件开放平台
  • 潍坊百度搜索优化东莞seo优化排名
  • 免费的公众号排版工具福建seo快速排名优化
  • 重庆网站设计公司推荐新开网站
  • 怎样提高网站排名四川省最新疫情情况
  • 做暧暖ox免费视频网站百度推广助手怎么用
  • 桂林企业网站建设网络推广怎么做
  • 做网站作业sem优化师是什么意思
  • 重庆模板建站哪家好广东新闻今日最新闻
  • 衡水哪家制作网站好网页设计个人主页模板
  • 怎么查网站的注册信息网站开发语言
  • 云服务器建设简易网站安卓优化大师app下载
  • wap手机网站程序seo快速排名是什么
  • 哈尔滨政务性网站制作公司seo有什么作用
  • 专做袜子的网站优化模型
  • 有什么网站可以帮人做模具吗网络广告营销典型案例
  • 做h5页面的网站哪个好短视频广告投放平台
  • 做网站空间下载百度到桌面
  • 做自媒体搬运文章的网站市场营销方案怎么写
  • 男女做羞羞的视频网站aso优化哪家好
  • 食品网站建设 网站定制开发会计培训班一般收费多少
  • 抖音代运营是怎么回事seo网络优化师
  • 免认证域名注册菏泽资深seo报价
  • 管理网站用什么系统好云南网络营销公司哪家好
  • 整站seo需要多少钱恩施seo整站优化哪家好
  • 中山市网站建站公司网站优化策略
  • 网站建设联系方式故事型软文广告
  • 公司网站建设的定位语要怎么取重庆seo海洋qq
  • 正能量网站大全百度竞价关键词优化