您的位置:

什么是hover hand?如何在CSS中使用hover hand?

一、什么是hover hand?

在拍照或拍摄视频时,有些人会把手放在别人的肩膀或手臂上,这种表现被称为“hover hand”,直译为“悬浮的手”。这个动作通常是因为那个人不自信或不熟悉对方,所以不愿意有过多的身体接触。

在照片和视频共享的社交媒体上,“hover hand”已经成为了一个广泛的讨论话题。有些人认为这种动作展现出人们对社交情境不够自信,而有些人则认为这只是一个简单的个人喜好,没有什么不好的。

不管怎么说,要使用“hover hand”需要一些技巧和练习。这个动作需要在不失礼貌的前提下,尽量避免身体接触,给对方留下友好和亲切的印象。

二、如何在CSS中使用hover hand?

CSS中的“hover”是一种伪类,指的是鼠标悬停在某个元素上时的状态。可以使用“hover”来添加与“hover hand”相关的效果。

下面是一个示例,假设有一个带有图像的div元素。我们想当鼠标在图像上悬停时,添加“hover hand”效果:

.hover-hand {
  display: inline-block;
  position: relative;
  cursor: pointer;
}
.hover-hand:hover::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid #000;
  border-radius: 20px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: -1;
}

这段代码会将div元素的显示方式设置为inline-block,并将指针的样式设置为“pointer”,这样当鼠标悬停在图片上时,指针会变成手型,给用户一种可以点击图像的感觉。

在:hover伪类中,使用“::before”伪元素来创建一个假的元素,将其位置设置在原始元素之前,为添加阴影和边框等效果提供支持。使用“pointer-events:none”以防止“hover hand”实际上覆盖了图像,而不是只是出现在图像上。

这段代码并不完美,但是它可以作为一种起点,可以根据具体情况进行调整。根据不同的需要,您可以添加阴影、动画效果或其他样式更改,使您的“hover hand”看起来更逼真。

三、结语

虽然“hover hand”是一个看起来很小的问题,但它涉及到人际关系,因此需要灵活使用。在使用“hover hand”时要练习、自信,并尊重他人的空间。在CSS中使用“hover hand”时,可以根据具体情况进行样式调整,使其看起来更自然、更真实。

什么是hover hand?如何在CSS中使用hover h

2023-05-12
利用CSS的Hand Cursor提升用户体验

2023-05-12
CSS hover cursor

2023-05-12
如何利用js改变鼠标样式(如何利用js改变鼠标样式方法)

本文目录一览: 1、javascript 改变鼠标样式 2、js canvas 如何改变鼠标形状 3、JS 或者Jquery怎么实现:点击一个按钮之后鼠标样式改变,然后单击一次之后变回正常形状 jav

2023-12-08
CSS :hover 样式详解

2023-05-19
CSS hover手势含义

2023-05-12
CSS cursor hand: 设定鼠标指针样式的关键字

2023-05-12
深入了解Hover效果

2023-05-18
Vue鼠标hover事件详解

2023-05-17
CSS小手的完全指南

2023-05-16
如何用CSS实现加号样式

2023-05-12
js行内样式怎么写,css行内样式怎么写

本文目录一览: 1、js的行内写法是什么 2、笔记:JS设置CSS样式的几种方式 3、JS里添加样式 4、JS如何设置表格行样式? js的行内写法是什么 就是把方法写在标签里面input type="

2023-12-08
swiper鼠标hover停止自动轮播

2023-05-19
如何在HTML中设置CSS margin?

2023-05-12
when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${item.id} [in template "article/detail/index.ftl" at line 48, column 106] ---- Java stack trace (for programmers): ---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:481) at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:401) at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:370) at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:104) at freemarker.core.DollarVariable.accept(DollarVariable.java:63) at freemarker.core.Environment.visit(Environment.java:371) at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:321) at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271) at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:244) at freemarker.core.Environment.visitIteratorBlock(Environment.java:645) at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:108) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94) at freemarker.core.Environment.visit(Environment.java:335) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.Environment.process(Environment.java:314) at freemarker.template.Template.process(Template.java:383) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:332) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:266) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:220) at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:181) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:314) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1431) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1167) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1106) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.software.filter.HttpSpiderIdentifyFilter.doFilter(HttpSpiderIdentifyFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)