我希望将var num更改为百分比,而不是若干像素。我该怎么做?
我的站点需要这个:,但它们与像素一起工作,我的网站使用%(因为自动标度(例如,在高清屏幕或全高清屏幕上)
/*动态顶部菜单定位* */
var num = 150 ; //number of pixels before modifying styles 150
$(window).bind('scroll', function () {
if ($(window).scrollTop() > num) {
$('.menu').addClass('fixe
这是我的代码:
<html>
<head>
<style>
body {
margin: auto;
width: 720px;
}
</style>
</head>
<body>
<p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
我需要将DataFrame中的数据加载到mysql中。我尝试使用df.to_sql,遵循,建议使用:.to_sql(name, con, flavor='mysql', if_exists='fail', index=True, index_label=None)
我得到了这个错误:ValueError: database flavors mysql is not supported
我怎样才能绕过这个问题?
我使用来实现我的视图的滚动。
以下是一些代码:
@Override
protected void onDraw(Canvas canvas) {
if (scroller.computeScrollOffset()){
int x = scroller.getCurrX();
int y = scroller.getCurrY();
scrollTo(x, y);
ViewCompat.postInvalidateOnAnimation(this);
}
super.onDraw(canvas);
}