小编cod*_*ard的帖子

如何折叠CSS网格中未使用的行?

所以我在移动设备上有一个简单的三个段落堆栈,我希望在较大视口的网格中设置样式,而不更改源顺序.

第一部分可能包含从几行到没有内容的任何内容.

在这种情况下,如何使第一行折叠,以便第二行填充空格?IE顶部为空时,最后一部分应显示在顶部

.grid  {
    display: grid;
    grid-template-rows: min-content auto;
    grid-template-columns: 60% 40%;
    grid-template-areas: 
        "main first"
        "main last";
}

.first { grid-area: first; }
.main { grid-area: main; }
.last { grid-area: last; }
Run Code Online (Sandbox Code Playgroud)
<div class="grid">
  <b class="first">Grant me revenge!</b>
  <b class="main">Arnold ipsum. Just bodies. I need your clothes, your boots, and your motorcycle. Grant me revenge! And if you do not listen, then to HELL with you. Make it quick because my horse is getting tired. Come on don't …
Run Code Online (Sandbox Code Playgroud)

css css3 css-grid

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

在Parse.com中保存时,Geopoint默认为0,0(Javascript SDK)

当我尝试将GeoPoint与我的'NewLog'解析对象一起保存时,GeoPoint始终默认为0,0.使用下面的代码,locationLat和locationLong包含一个有效的地理位置,可以按预期将其保存到locationLat/Long字段中.

var locationLat = $("#locationLat").val();
var locationLong = $("#locationLong").val();
var NewLog = Parse.Object.extend("NewLog");
var newLog = new NewLog();

var locationString = locationLat + ", " + locationLong;
console.log(locationString);

var location = new Parse.GeoPoint(locationString);

newLog.set("location", location);
newLog.set("locationLat", locationLat);
newLog.set("locationLong", locationLong);
Run Code Online (Sandbox Code Playgroud)

我可以使用新的Parse.GeoPoint(-36.82655429726454,174.4372643280756); 没有任何问题,locationString的日志也看起来正确.GeoPoint似乎似乎不接受我尝试过的任何语法变体的变量.

javascript parse-platform

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

标签 统计

css ×1

css-grid ×1

css3 ×1

javascript ×1

parse-platform ×1