我需要在有序列表中使用display:flex作为li元素.问题是flex会隐藏列表编号.这是一个例子:http://jsfiddle.net/pzpeam7o/
我在li元素中使用span.在调整页面大小时,flex允许更好的行为.
HTML:
<!DOCTYPE html>
<head lang="en">
<title></title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<ul>
<li class="lst"> First item</li>
<li class="lst"> Second item</li>
<li class="lst"> Third item</li>
<li class="lst"> Fourth item</li>
</ul>
</body>
Run Code Online (Sandbox Code Playgroud)
CSS:
.lst {
list-style-type: decimal;
display: flex;
}
Run Code Online (Sandbox Code Playgroud) 我试图在swift 3中连接多个字符串:
var a:String? = "a"
var b:String? = "b"
var c:String? = "c"
var d:String? = a! + b! + c!
Run Code Online (Sandbox Code Playgroud)
编译时我收到以下错误:
error: cannot convert value of type 'String' to specified type 'String?'
var d:String? = a! + b! + c!
~~~~~~~~^~~~
Run Code Online (Sandbox Code Playgroud)
这曾经在swift 2中工作.我不知道为什么它不再起作用.