开发者社区 问答 正文

ios问题,如何将界面设置成不规则的九宫格形状

就是打开应用的时候,进去的界面是一个不规则的九宫格,而且九块面积不一样,形状不同,点击不同的地方进入不同的页面实现不同的功能

展开
收起
a123456678 2016-07-27 11:39:38 2094 分享 版权
1 条回答
写回答
取消 提交回答
  • var a = Math.ceil(Math.random()*30)+10;
    var b = Math.ceil(Math.random()*30)+10;
    var c = Math.ceil(Math.random()*30)+10;
    var d = Math.ceil(Math.random()*30)+10;
    document.write('<table width="500" height="900" border="1"><tr>');
    document.write('<td width="'+a+'%" height="'+b+'%"></td>');
    document.write('<td width="'+c+'%"></td>');
    document.write('<td></td>');
    document.write('</tr><tr>');
    document.write('<td height="'+d+'%"></td>');
    document.write('<td></td>');
    document.write('<td></td>');
    document.write('</tr><tr>');
    document.write('<td></td>');
    document.write('<td></td>');
    document.write('<td></td>');
    document.write('</tr></table>');
    2019-07-17 20:00:29
    赞同 展开评论