小编San*_*o21的帖子

按钮的定位不起作用

我创建了一个按钮,所以当我点击它时会出现一张随机卡片.在随机卡上是"x".我不能将"x"放在右上角,我不知道为什么它不起作用.

我想创建一个函数,这样当我点击"x"时,随机卡就会被删除.

这是我的HTML:

<button class="plus">
  <div class="item">
    <p> + </p>
  </div>
</button>

<div id="newCardHolder">

</div>

    <div id="cardPrototype" class="card" style="display:none;">
        <p  class="delete">x</p>
      <span> Title </span>
      <form name="theform" style="display:none;">
        <input class="input-feld" type="text">
        <br>
        <input class="input-feld " type="text">
        <br>
        <input class="speichern"type="button" onClick="new Person()" value="Speichern">
        <input class="abbrechen"type="button" onClick="new Person()" value="Abbrechen">
      </form>
    </div>
Run Code Online (Sandbox Code Playgroud)

我的CSS:

.input-feld {
    font-family: TheSans Swisscom;
    margin:3px;
}

.card {
            width:300px;
            margin-right:5px; 
            margin-left:5px; 
            margin-bottom:10px; 
            float: left;
            padding:10px; 
            background-color: #BBBBBB; 
            border: 1px solid #ccc; 
            border-radius:10px;
}

.delete {
            font-family:'TheSans Swisscom';
            right:0;
            top:0;
} …
Run Code Online (Sandbox Code Playgroud)

html css jquery

4
推荐指数
1
解决办法
105
查看次数

回应Textarea

大家好,我想让我的textarea响应.但我真的不知道该怎么做.我tryied它width 100%max-width 600px.我的容器也有600px的宽度.随着width 100%textarea变小,那么容器也有600px.随着max-width 600px盒子变得非常小.这是我的代码:

<div class="container contact">
<textarea class="inputmessage"></textarea>
</div>
.inputmessage{
    float: left;
    border: 2px solid black;
    height: 150px;
    width: 600px;
}
.container{
    text-align: center;
    margin: auto;
}

.contact{
    width: 600px !Important;
}
Run Code Online (Sandbox Code Playgroud)

html css

1
推荐指数
1
解决办法
64
查看次数

标签 统计

css ×2

html ×2

jquery ×1