简体   繁体   English

CSS框宽度不变

[英]CSS box width not changing

I'm following this library for drag and drop on mobile: 我正在该库中进行移动拖放:

http://interactjs.io/ http://interactjs.io/

Specifically the second paragraph: "Drag and drop" 特别是第二段:“拖放”

I am trying to change the size of the blue boxes with class drag-drop by editing: 我正在尝试通过编辑来通过类拖放来更改蓝色框的大小:

.drag-drop {
display: inline-block;
width: 10px;
height: 10px;
padding: 2em 0.5em;

color: #fff;
background-color: #29e;
border: solid 2px #fff;

-webkit-transform: translate(0px, 0px);
      transform: translate(0px, 0px);

transition: background-color 0.3s;
}

However this does not seem to do the trick. 但是,这似乎并不能解决问题。 What am I missing? 我想念什么? CSS is my weak point so consider me as a basic user. CSS是我的弱点,因此请以我为基本用户。

There is a typo, it's WIDTH not WEIGHT 有错别字,不是宽度

width: 10px; 宽度:10px;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM