css实现 当鼠标移到input的时候,input框出现阴影,当移动到button的时候,input框的阴影消失,button框出现阴影

<meta charset="utf-8" />
<style type="text/css">
div{overflow: hidden;}
div.search_box input{
    float:left;
    width:200px;
    height:50px;
    box-sizing:border-box;
    padding:0 40px 0 10px;
    line-height:50px;
    border:0;
    border-left:1px solid #ddd;
    outline:none;
}
.search_box>form>button{
    float:right;
    width:40px;
    height:50px;
    border:0;
    border-right:1px solid #ddd;
    background:url(search1x.png) no-repeat center;
    position:absolute;
    left:160px;
}
 div.search_box input:hover{
    box-shadow: inset 0 -2px 2px #3b6caa,inset 2px 0 2px #3b6caa,inset -2px 0 2px #3b6caa;
}
div.search_box button:hover{
    box-shadow:inset 0 -2px 2px #3b6caa, inset 2px 0 2px #3b6caa, inset -2px 0 2px #3b6caa;
    cursor:pointer;
}
</style>

<div class="search_box">
     <form>
          <input type="text" placeholder="Search" >
          <button type="submit" ><button>
     </form>
</div>
时间: 2024-08-24 01:11:05

css实现 当鼠标移到input的时候,input框出现阴影,当移动到button的时候,input框的阴影消失,button框出现阴影的相关文章

用CSS怎样实现鼠标移上去背景颜色变色 onmouseover、onmouseout

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-

jQuery事件 mouseover方法与mouseout方法实现鼠标移进显示移出消失的效果 (css控制span标签)

<script> $(function(){ var text ; $(".pos span").each(function(){ text = $(this).text().trim(); if(text=="设为默认"){ $(this).css('display','none'); } }); $(".pos").mouseover(function(){ //鼠标移进显示效果 text = $(this).find('span

DIV css中cursor属性详解-鼠标移到图片变换鼠标形状 (转)

css中cursor属性详解-鼠标移到图片变换鼠标形状 语法: cursor : auto | all-scroll | col-resize| crosshair | default | hand | move | help | no-drop | not-allowed | pointer | progress | row-resize | text | vertical-text | wait | *-resize | url ( url )  取值: auto  :   默认值.浏览器根

css实现 鼠标移上放大效果 或 显示隐藏内容 简单原型

适当调整即可变为图片放大镜效果,或者鼠标移上去显示隐藏内容(ie6对hover支持不够完善,推荐在火狐或谷歌中观看). 效果如图: css: .demo {        width: 318px;        margin: 100px auto 0 auto;    } .demo:after {        content: "";        display: block;        height: 0;        clear: both;    } .demo

[Html / Javascript / CSS] 当鼠标移至img时,img右上角出现一个叉叉超链接

因为工作上客户需要制作类似FB的图片删除方式 备份一下在论坛上的发问:http://social.msdn.microsoft.com/Forums/zh-TW/0abb451a-e8ac-4f28-ab91-fc028ee14ec9/imgimg?forum=236 以下代码改用jQuery实现 @{ ViewBag.Title = "Index"; } .imgDiv{ display : inline-block; position : relative; } .imgDiv .

input.style.borderColor及input.style.backgroundColor 输入框样式特效 鼠标移过输入框 输入框背景变色

html <!DOCTYPE html><html lang="zh-cn"><head> <meta charset="UTF-8"> <title>输入框样式特效</title> <script src="../js/try.js"></script></head><body bgcolor="#ffcc99"

转:纯CSS实现“鼠标移过显示层”效果

利用<a>标签的a:hover状态触发鼠标移过的动作,其中未触发状态显示为单个图片.兼容IE6/7/8以及FF/Chrome等主流浏览器.以下是图示及完整代码. 原文:http://www.cnblogs.com/eecc/articles/2225473 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1

鼠标移到元素上指针变为不可用状态

鼠标移到元素上指针变为不可用状态:鼠标的指针状态与很多种,分别代表着不同的含义,下面介绍一下如何实现当鼠标悬浮于一个元素的时候,鼠标指针会变味不可用状态,代码实例如下: <!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" />

关于table里的数据太长超出列宽时,不换行,出省略号,鼠标移上去以后显示全部数据

#t1{ table-layout:fixed; } #t1 td{ text-overflow:ellipsis; overflow:hidden; white-space: nowrap; } 上面是css 1 <table width="670" align="center" border="0" cellpadding="0" cellspacing="0" class="tyouh