我正在开发一个新网站,我想为我的用户创建一个漂亮的网址.我什么都不知道,htaccess在谷歌上找不到我的解决方案.
我需要链接:
user.mywebsite.com 以>> mywebsite.com/users/useruser2.mywebsite.com/contact 以>> mywebsite.com/users/user2/contact某些链接可能不会像以下链接:
www.mywebsite.com 可能没有链接到 mywebsite.com/users/www 这可能htaccess吗?如果有,有人可以向我解释一下吗?
我试图获得元素的顶部位置和边距底值.
有效:
var top = -$('elem').postion().top; // lets say its -54
var margin = $('elem').css('margin-top'); // lets say its 0
Run Code Online (Sandbox Code Playgroud)
我需要为我的动画功能添加它们.所以top+marginjQuery给出-540像素,但它需要返回-54像素..或者当它为负时它只需要-54-10px,当我需要-64像素时.
有没有办法解决这个问题?我无法忍受它,它让我很烦恼!
我的代码:
var top = -$('#id1').position().top;
var margin = $('.scrollable').css('margin-top');
var combine = top+margin;
$('.animate').animate({'margin-top' : combine});
Run Code Online (Sandbox Code Playgroud)