我有一个UL,在div中我设置了DIV,UL和LI的宽度.如果有的话我想要溢出滚动,所以我将溢出设置为auto.但是,当它太宽时,我似乎无法阻止LI跨越线.这是我正在使用的CSS:
/* id of the containing div */
#ul-container {
width: 325px;
border-style: solid;
border-width: 1px;
border-radius: 4px;
border-color: #4297d7;
overflow: auto;
}
/* this is the id if the ul*/
#selectable {
width: 300px;
height: 75px;
}
#selectable .ui-selecting {
background: #ccc;
}
#selectable .ui-selected {
background: #4297d7;
}
li {
list-style: none;
overflow: auto;
width: 300px;
margin-left: -25px;
}
Run Code Online (Sandbox Code Playgroud)
li中的溢出属性似乎没有做任何事情.当我把它放在div上时,无论是否需要,我都会获得水平滚动.任何帮助将不胜感激.
我正在尝试使用Yahoo Finance API将数据读入DataFrame.但是,当我从列表中读取符号的值时,它们最终会出现在DataTable中的单个列中.我正在使用API,因为我实际上想要分红,P/E等数据,我认为你不能用datareader访问这些数据.我有两个问题:
我将如何完成我想要为股票代码列表做的事情
import urllib2
from pandas import DataFrame
def get_data2(symbol):
columns = ['last','date','change','high','low','vol']
url = "http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=sl1d1c1hgv" % symbol
file =urllib2.urlopen(url)
s = file.read()
file.close()
s= s.strip()
L = s.split(',')
L[0] = L[0].replace('"','')
L[2] = L[2].replace('"','')
D = DataFrame(L, columns=columns)
return D
Run Code Online (Sandbox Code Playgroud)使用此代码,我得到一个ValueError,因为形状不匹配,但实质上我想从列表中读取每个值到DataTable中的一列,并最终迭代一个符号列表.
谢谢你的帮助