简体   繁体   English

如何使我的网站不在移动设备上拖动?

[英]How can I make my website not drag on mobile devices?

I keep running into a problem while building websites - on mobile devices, if you drag with your finger, the whole site moves around, moving partially outside the screen or wherever you drag it. 在建立网站时,我一直遇到问题-在移动设备上,如果您用手指拖动,则整个网站会四处移动,部分移动到屏幕外或将其拖动到任何地方。 I find this to be unprofessional and really ugly. 我觉得这很不专业而且很丑陋。 Other websites I visit seem to have solved this problem but I have not been able to figure it out by looking at their source code. 我访问的其他网站似乎已经解决了这个问题,但是我无法通过查看其源代码来解决它。 Any thoughts? 有什么想法吗?

Thanks in advance. 提前致谢。

Probably 大概

<body  draggable="false" ondragstart="return false">

See snippet for an example using a div container 有关使用div容器的示例,请参见代码段

 <div draggable="false" ondragstart="return false"> Robert Wertheimer Frucht (later known as Roberto Frucht) (9 August 1906 – 26 June 1997)[1][2] was a German-Chilean mathematician; his research specialty was graph theory and the symmetries of graphs. The Frucht graph. In 1908, Frucht's family moved from Brünn, Austria-Hungary (now in the Czech Republic), where he was born, to Berlin.[2] Frucht entered the University of Berlin in 1924 with an interest in differential geometry, but switched to group theory under the influence of his doctoral advisor, Issai Schur; he received his Ph.D. in 1931.[3][4] Unable to find academic employment in Germany due to his Jewish descent, he became an actuary in Trieste, but left Italy in 1938 because of the racial laws that came into effect at that time.[3][5] He moved to Argentina, where relatives of his wife lived, and attempted to move from there to the United States, but his employment outside academia prevented him from obtaining the necessary visa.[2][5] At the same time Robert Breusch, another German mathematician who had been working in Chile for three years but was leaving for the US, invited Frucht to fill his position at Federico Santa María Technical University in Valparaiso, Chile, where Frucht found an academic home beginning in 1939.[1][2][6] At Santa María, Frucht became dean of the faculty of mathematics and physics from 1948 to 1968, and retired to become an emeritus professor in 1970.[2] Frucht is known for Frucht's theorem, the result that every group can be realized as the group of symmetries of an undirected graph,[7][8] and for the Frucht graph, one of the two smallest cubic graphs without any nontrivial symmetries. LCF notation, a method for describing cubic Hamiltonian graphs, was named for the initials of Joshua Lederberg, HSM Coxeter, and Frucht, its key developers.[9] Frucht was elected to the Chilean Academy of Sciences as a corresponding member in 1979.[2] A special issue of the Journal of Graph Theory was published in Frucht's honor in 1982,[2][10] and another special issue of the journal Scientia, Series A (the journal of the mathematics department of Federico Santa María Technical University) was published in honor of his 80th birthday in 1986.[2][11] </div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM