首页 \ 问答 \ 没有行的bootstrap列比行填充更多的列(bootstrap columns without rows padded more than columns with rows)

没有行的bootstrap列比行填充更多的列(bootstrap columns without rows padded more than columns with rows)

我正在使用自举网格系统来布局模态。

显示商店的模式部分不能有行,因为它只是商店中的foreach商店,所以我不能在它们之间插入行。 这很好,除了它似乎在列不在行内时添加更多填充,这导致我的商店不与上面的内容垂直对齐。 这就是我的意思(商店是纯白色的div):

在此处输入图像描述

商店的填充比上面的内容更进一步。 商店没有连续。

一个商店的代码:

<script type="text/html" id="shop-template">
    <div class="col-sm-6" style="">
        <div style="height: 200px;width:100%; background: #fff;border-radius:15px;padding: 25px;">
            <h6 class="medium-text shop-info" 
                data-bind="text: name" >
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: suburb" 
                style="">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: streetNumber" style="display:inline;">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: street" style="display:inline;">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: country" >
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: postalCode" >
            </h6>
        </div>
    </div>
</script>

如何使商店与上面的内容垂直对齐?


I'm using the bootstrap grid system to lay out a modal.

The part of the modal that displays shops cannot have rows, because it is simply a foreach shop in shops, so I can't insert rows in between them. This is fine except that it seems to add more padding when the columns are not inside rows, which causes my shops to not be vertically aligned with the content above. Here is what I mean (the shops are the solid white divs):

enter image description here

The shops are padded further in than the content above them. The shops are not in a row.

code for one shop:

<script type="text/html" id="shop-template">
    <div class="col-sm-6" style="">
        <div style="height: 200px;width:100%; background: #fff;border-radius:15px;padding: 25px;">
            <h6 class="medium-text shop-info" 
                data-bind="text: name" >
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: suburb" 
                style="">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: streetNumber" style="display:inline;">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: street" style="display:inline;">
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: country" >
            </h6>
            <h6 class="medium-text shop-info" 
                data-bind="text: postalCode" >
            </h6>
        </div>
    </div>
</script>

How do I make the shops vertically aligned with the content above?


原文:https://stackoverflow.com/questions/37344036
更新时间:2022-05-24 06:05

最满意答案

a.[0] 返回: '1'的第一个字符 。 将字符转换为int将返回其ASCII码 。 你需要在字符串上调用int来代替:

let x = a.Substring(a.Length - 1)
int x

(我在第一行使用了标准的.Net方法; F#标准库也有相同的功能。)


a.[0] returns the first character of a: '1'. Casting a character to int returns its ASCII code. You need to call int on a string instead:

let x = a.Substring(a.Length - 1)
int x

(I've used standard .Net methods on the first line; the F# standard library also has functions to do the same.)

相关问答

更多
  • 如果您使用Linq,它只是一行代码。 public int findWeightByName(string name, Flaske[] kasse) { return kasse.Where(x => x.name == name).Sum(w => w.weight); } Where使用传递的名称提取Flaske序列,Sum对序列进行处理以总结权重 It is just one line of code if you use Linq. public int findWeightByName ...
  • 对于int(这是4个字节并签名)来说它太大了。 使用 Long.parseLong("AA0F245C", 16); It's simply too big for an int (which is 4 bytes and signed). Use Long.parseLong("AA0F245C", 16);
  • Convert.ToInt32可能仍会抛出错误,例如当它为空时,因此使用: int result=0; Int32.TryParse(Request.Form["ID"].ToString(), out result); 然后在你的代码中: Nav n = navDB.Navs.FirstOrDefault(row => row.ID == result); Convert.ToInt32 may still throw an error, for example when it is empty ...
  • 教授对zfill的询问是: ip = ip[0].__str__().zfill(3) + ip[1].__str__().zfill(3) + ip[2].__str__().zfill(3) + ip[3].__str__().zfill(3) 但请注意,您的列表已包含字符串,因此您无需再次转换它们,那么您的代码将是: ip = ip[0].zfill(3) + ip[1].zfill(3) + ip[2].zfill(3) + ...
  • a.[0] 返回: '1'的第一个字符 。 将字符转换为int将返回其ASCII码 。 你需要在字符串上调用int来代替: let x = a.Substring(a.Length - 1) int x (我在第一行使用了标准的.Net方法; F#标准库也有相同的功能。) a.[0] returns the first character of a: '1'. Casting a character to int returns its ASCII code. You need to call int o ...
  • 尝试使用GetNumericValue而不是Convert.ToInt32()。 文档: http : //msdn.microsoft.com/en-us/library/system.char.getnumericvalue.aspx 另外 - 除非我遗漏了一些东西,否则你可能会简化你的代码: num1 = Char.GetNumericValue(date1[0]); num2 = Char.GetNumericValue(date1[1]); num3 = Char.GetNumericValue( ...
  • 我认为你的字符串是UTF16编码的 ,所以每个字符都用16位或2字节编码。 PHP仍然认为它是一个ASCII字符串,读取第一个字节( 2 ),然后读取第二个字节(零字符),然后停在那里。 iconv('UTF-16', 'ASCII', $year)应该有所帮助 编辑我猜测字符串是UTF16,因为它的字符虽然是ASCII,但每个字符占用2个字节。 你的字符串可能是亚洲双字节编码之一,但仍然很可能是Unicode,你可能在Windows上,因为UTF16是Windows的内部编码。 这是一篇关于Unicode ...
  • 注释掉这两行,它会起作用: lst.insert(lst.index(d), j2) lst.insert(lst.index(d), j1) 显然,当你循环遍历列表并同时删除,并在开始索引时插入错误。 为避免麻烦,请使用列表的副本: def date(lst, d1, d2): lstC = list(lst) for d,dd in zip(lst, lstC): if int(d[4:]) >= int(d1[4:]) or int(d[4:]) <= int(d ...
  • 这里的问题是, p1.push(str1[i] - '0'); 正在尝试从'-'减去'0' ,如果字符串包含负数,因为您总是以i = 0开头。 您需要做的是在循环之前检查字符串是否为负数,然后根据该检查从0或1开始。 你可能有类似的东西 void Soma::StrToInt(char str1[], char str2[]){ int start = 0; if(str1[0] == '-'){ //if is negative negative1 ...
  • std::to_string(xWidth) 。 &几乎无关紧要。 to_string通过值获取int ,所以你的函数如何获取它并不重要:通过value,lvalue ref,rvalue ref, const或non const ... all都可以。 std::to_string(xWidth). The & is pretty much irrelevant. to_string takes the int by value, so how your function takes it doesn't ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。