文本区域会自动获取内联样式

编程入门 行业动态 更新时间:2024-10-27 22:21:24
本文介绍了文本区域会自动获取内联样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想给表单中的textarea自定义宽度,但是textarea自动获得内联样式,这会破坏我的自定义css样式?我查看了我的脚本,但我不知道哪个脚本在操纵dom ???请告诉我你是否知道.

i want to give a textarea in my form a custom width but the textarea is getting inline styels automatically which are overrriding my custom css styles?? i reviewed my scripts but i don't know which one is manipulating the dom??? please tell me if you know.

这是我标记的头

<head> <title>Demo Website</title> <link rel="stylesheet" href="maxcdn.bootstrapcdn/font-awesome/4.5.0/css/font-awesome.min.css"> <link href='fonts.googleapis/css?family=Open+Sans:400,600,800' rel='stylesheet' type='text/css'> <link href="//fonts.googleapis/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css"> <link href='fonts.googleapis/css?family=Paytone+One' rel='stylesheet' type='text/css'> <link href="cdnjs.cloudflare/ajax/libs/animate.css/3.5.0/animate.min.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/jquery-ui.min.css"> <link rel="stylesheet" href="css/style.css"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head>

这些是我体内最底层的唯一脚本

and these are the only scripts which are at the bottom in my body

<script src="code.jquery/jquery-2.1.4.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script src="js/app.js"></script>

顺便说一句,这是我创建的第一页,也是唯一的一个页面,因此我没有任何其他具有textarea字段的页面.我的文本编辑器就是方括号,您知道..

and by the way this is the first page i created and is the only one so i don't have any orther pages that have a textarea field.my text editor is brackets just so you know..

这是在开发工具中呈现的方式

here's how it's rendered in dev-tools

<textarea data-brackets-id="173" name="textarea" id="textarea" placeholder="MESSAGE" style="margin: 0px;width: 183px;height: 54px;"></textarea>

推荐答案

它既可以在移动设备上也可以在台式机上使用吗?检查表单元素的宽度,并使页边距宽度为183px.

Does it do it on mobile as well as desktop? Check the width of the form element and make the margin width 183px.

更多推荐

文本区域会自动获取内联样式

本文发布于:2023-11-10 00:28:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573857.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内联   样式   文本   区域

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!