大佬教程收集整理的这篇文章主要介绍了css – 绝对定位的文本区域不尊重右侧和底部属性,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我正在使用的CSS:
#container { position: relative; } #my-text-area { position: absolute; top: 0px; bottom: 0px; left: 10px; right: 10px; }
这是一个JsFiddle示例:enter link description here
是否有textarea默认属性,我必须禁用或这些只是错误?
有一些变通方法可以通过从父级继承这些属性来实现父级的完整宽度和高度,但我正在寻找一种方法来为将来的方案做出绝对定位,而不仅仅是自定义右侧和底部.
HTML:
<div id="container"> <div id="my-text-area"> <textarea></textarea> </div> </div>
CSS:
body,html,#container { width: 100%; height: 100%; } body { margin: 0px; } #container { position: relative; } #my-text-area { position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; } textarea { height: 100%; width: 100%; }
参考:http://snook.ca/archives/html_and_css/absolute-position-textarea
以上是大佬教程为你收集整理的css – 绝对定位的文本区域不尊重右侧和底部属性全部内容,希望文章能够帮你解决css – 绝对定位的文本区域不尊重右侧和底部属性所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。