Q
CSS按钮效果
1
A
回答
2
您可以通过将height: 30px;
添加到它来设置.common_button_container
的高度。
0
如果未指定容器的大小,使用:
.common_button_placeholder
{
background-color: transparent;
color: transparent;
}
.common_button
{
position: absolute;
}
.common_button:active
{
box-shadow: 0px 3px 3px -2px #777;
padding: 3px;
width:80px;
}
.common_button_container
{
border: 1px solid;
width: 100px;
padding: 7px;
}
<div class="common_button_container">
<div class="common_button">Submit</div>
<div class="common_button_placeholder">Submit</div>
</div>
的common_button
设置为absolute
; common_button_placeholder
不是。所以common_button_placeholder
是在原单后面,它设置了容器的大小,但common_button
对它没有进一步的影响。
只是为了造型,关于使用transition
如何:
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
相关问题
- 1. Onclick CSS按钮效果
- 2. 用CSS background-image模拟按钮效果?
- 3. onMouseDown按钮效果
- 4. 按下按钮的效果
- 5. 图片按下效果 - CSS
- 6. 模糊按钮效果
- 7. REWRITE:Navlinks图片按钮效果
- 8. android素材按钮效果
- 9. 2014按钮效果趋势
- 10. Html.Actionlink作为按钮效果
- 11. 按钮效果很好
- 12. Imagebutton的按钮效果
- 13. 菜单按钮效果
- 14. Silverlight按钮点击效果
- 15. Windows Phone按钮按下效果
- 16. 纯CSS动画播放状态门效果按钮
- 17. 用CSS点击'按钮上的动画效果
- 18. mootools在按钮上用css效果切换div
- 19. 如何在CSS中为按钮创建缩放效果?
- 20. 3D效果按钮悬停状态CSS(可能的错误?)
- 21. CSS:带阴影效果的圆形按钮
- 22. 鼠标悬停,css div效果,alpha和新按钮
- 23. 自定义css单选按钮悬停效果
- 24. Android:图像按钮或按钮突出显示效果时按
- 25. 仿效与jquery切换按钮和CSS
- 26. WP7页面导航效果和按钮效果
- 27. CSS效果
- 28. CSS KeyFrame效果
- 29. 按钮不占用jQuery UI按钮效果
- 30. 在JavaFx切换按钮中摆脱压制效果按钮
和使用'盒大小:边界box'。哦...和[**链接/ Div不是按钮**](http://www.karlgroves.com/2013/05/14/links-are-not-buttons-neither-are-divs-and -spans /) –