<div id="button" class="button">
<input name="call" type="submit" value="啊啊啊" onclick="myFunction()">
</div>
代码如上:,我如何定义input的样式?下面的应该是#button.call有问题
<style>
#button {
position: absolute;
left: 50%;
top: 50%;
margin-left: -250px;
margin-top: -100px;
}
#button.call{
width:430px;
height:150px;
font-size:90px;
border:2px solid;
border-radius:25px;
-moz-border-radius:25px;
}
</style>
css div input 怎么写
答案:5 悬赏:0
解决时间 2021-02-20 03:27
- 提问者网友:无悔疯狂
- 2021-02-19 02:31
最佳答案
- 二级知识专家网友:兮沫♡晨曦
- 2021-02-19 03:55
<div id="button">
<input class="call" type="submit" value="啊啊啊" onclick="myFunction()">
</div><style>
#button {
position: absolute;
left: 50%;
top: 50%;
margin-left: -250px;
margin-top: -100px;
}
#button .call{
width:430px;
height:150px;
font-size:90px;
border:2px solid;
border-radius:25px;
-moz-border-radius:25px;
}
</style>
<input class="call" type="submit" value="啊啊啊" onclick="myFunction()">
</div><style>
#button {
position: absolute;
left: 50%;
top: 50%;
margin-left: -250px;
margin-top: -100px;
}
#button .call{
width:430px;
height:150px;
font-size:90px;
border:2px solid;
border-radius:25px;
-moz-border-radius:25px;
}
</style>
全部回答
- 1楼网友:放肆的依賴
- 2021-02-19 06:58
#button input
#button.call 是错的 call是name不是class 把name改成class就是对的
- 2楼网友:恕我颓废
- 2021-02-19 06:44
name="call"又不是class="call",当然不会有效。id和class才是css和html的桥梁
改为:
<input name="call" class="call" ....... />
还有 #button.call 少了个空格,改为 #button .call
- 3楼网友:承载所有颓废
- 2021-02-19 05:07
<input class="call" name="call" type="submit" value="啊啊啊" onclick="myFunction()">你加个class="call"
而且选择器中间打个空格
#button .call{
- 4楼网友:怪咖小青年
- 2021-02-19 04:05
font-family: [ [ | ] [ , | | ]* ]
这个意思好像是需要加一个通用的字体,也就是说你至少需要有一个默认的字样式吧,可以像下面那样写:
font-family:"microsoft yahei", arial, helvetica, sans-serif;你好,这个问题解决了吗?
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯