使用带有服务器端ASP.NET的可拖动jquery库时出现问题 [英] I got a problem when using draggable jquery library with server-side ASP.NET
问题描述
我使用Draggable jQuery Library来移动对象(输入,跨度)标签,
之后很容易得到Left,来自每个对象的CSS顶部用jQuery保存所有位置外部CSS文件中的元素(例如服务器端StreamWriter)并在页面启动时再次加载它。
当我使用position:absolute时问题开始了;对于所有元素。并将元素的左上角位置分配给CSS文件,直到现在没问题。
但是我需要应用dir属性,例如:
用于制作RightToLeft页面(阿拉伯语/英语)。
是的,它的效果很好,双向工作没有绝对的位置。 (相对有效)
但是当使用位置:绝对时;元素仍然在同一个地方,所以我尝试替换* .CSS内容当我需要更改为阿拉伯语时替换左:%% px到右:%% px
但这是非常糟糕的解决方案。
我现在应该做什么。
我尝试了什么:
i尝试替换CSS内容,但其糟糕的方法是将dir属性用于整页而不改变左起CSS: - >右:
I use Draggable jQuery Library for moving objects ( inputs, span ) tags,
after that it`s easy to get Left, Top from CSS of each object with jQuery for saving the positions of all elements in external CSS file (Server-Side StreamWriter for example) and load it again when page start.
the problem starts when i use position:absolute; for all elements. and assign left, top position of elements to CSS file, till now no problem.
but i need to apply dir attribute for example :
for making RightToLeft Page ( Arabic/ English ) .
yes it works great and Bidirectional works without absolute position . ( in relative it works )
but when use position :absolute; elements still in the same place, so that i try to replace *.CSS contents when i need change to arabic by replace left:%%px to right:%%px
but this is very bad solution.
what i should do now.
What I have tried:
i try replacing CSS content but its bad approach ineed use dir attribute to whole page without changing CSS from left: - > right:
推荐答案
<!DOCTYPE html>
<html>
<body>
<p dir="rtl">right-to-left!</p>
<p dir="ltr" style="Position:relative;left :50px;">left-to-right!</p>
</body>
</html>
根据您的问题,您可以使用dir对齐left2right( ltr ),right2left( rtl )
As per your question you can use "dir" for align left2right(ltr) ,right2left (rtl)
这篇关于使用带有服务器端ASP.NET的可拖动jquery库时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!