想象一个水平可滚动的div,它包含两个可垂直滚动的div.
您应该水平滚动导航,然后在内部div中垂直滚动以读取内容.
/* MINIMAL RESET */
body, html {
height: 100%;
margin: 0;
padding: 0;
}
* { box-sizing: border-box; }Run Code Online (Sandbox Code Playgroud)
<div style="
overflow-x: scroll;
white-space: nowrap;
width: 100%;
height: 100%;
position: relative;
background-color: black;
">
<div style="
width: 100%;
height: 100%;
left: 0%;
top: 0px;
margin: 0px;
position: absolute;
display: inline-block;
background-color: green;
">
<div style="
width: 100%;
height: 100%;
overflow-y: scroll;
">
<div style="
width: 100%;
height: 200%;
">
</div>
</div>
</div>
<div style="
width: 100%;
height: 100%; …Run Code Online (Sandbox Code Playgroud)我有一个名为DIR的文件夹和一个名为SUB的子文件夹.我正在运行的java文件放在DIR文件夹中,现在我想将我的小字符串保存在SUB文件夹中的.txt文件中.
你可以帮帮我吗?
我一直在使用javascript中的一些数组.我在这一行有一个解析错误:
var cardData[0] = [
[
'Rumble Pack',
'Robert Mugabe',
0.2,
0.7,
21,
RuleTypes.dictatorship,
'88%',
'45%',
'\'The Jewel of Africa\', Zimbabwe, returning to the stone age. R.M. let a rabble led by Chenjerai \'Hitler\' Hunzwi murder white farmers at will. 25 % of Zimbabwians HIV-positive. Life expectancy fallen 16 yrs. under R.M.'
]
];
Run Code Online (Sandbox Code Playgroud)
请记住,这条线是一条线,我不知道这是否有所不同......有人可以帮助我吗?:).
最近我在使用Xcode(7.0)的beta版时遇到了一个问题.我无法听到通过此代码播放的声音:(它是来自Main.storyboard的ViewController,有一个连接的按钮buttonTouchUpInside())
import UIKit
import AVFoundation
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func setupAudioPlayerWithFile(file:NSString, type:NSString) -> AVAudioPlayer {
let path = NSBundle.mainBundle().pathForResource(file as String, ofType: type as String)
let url = NSURL.fileURLWithPath(path!)
var audioPlayer:AVAudioPlayer?
do {
try audioPlayer = AVAudioPlayer(contentsOfURL: url)
} catch {
print("NO AUDIO PLAYER")
}
return audioPlayer!
}
@IBAction func buttonTouchUpInside(sender: AnyObject) {
let backMusic = setupAudioPlayerWithFile("sound", …Run Code Online (Sandbox Code Playgroud) 我遇到了一个简单的问题,我认为你们可以解决这个问题.我正在编写javascript,我使用以下代码用另一个字符串替换字符串中的所有字符串:
str = str.replace(/find/g,”replace”)
Run Code Online (Sandbox Code Playgroud)
是的,代码有效,但我想做的是:
str = str.replace(/</p>/g,”replace”)
Run Code Online (Sandbox Code Playgroud)
由于以下原因,它不起作用:
</p>.
Run Code Online (Sandbox Code Playgroud)
它不喜欢/.
谁可以帮助我?