我试图加入grid library from github。问题是,当我这样做时没有任何反应。
这就是我做的方式:
var myGrid = new GridList(document.getElementById('container'), {
direction: 'horizontal',
lanes: 3
});
奇怪的是,我甚至没有收到错误!
var myGrid = new GridList(document.getElementById('container'), {
direction: 'horizontal',
lanes: 3
});
ul {
display: flex;
}
li {
width: 100px;
height: 50px;
background-color: green;
border: 1px solid orange;
list-style-type: none;
}
<script src="https://cdn.rawgit.com/hootsuite/grid/master/src/gridList.js"></script>
<ul id="container">
<li id="01">Number 01</li>
<li id="02">Number 02</li>
<li id="03">Number 03</li>
<li id="04">Number 04</li>
<li id="05">Number 05</li>
<li id="06">Number 06</li>
<li id="07">Number 07</li>
<li id="08">Number 08</li>
<li id="09">Number 09</li>
<li id="10">Number 10</li>
</ul>