< p>Baconipsumdolorametcapicolapigribey"> div溢出導致滾動行為異常-PHP中文網路問答
div溢出導致滾動行為異常
P粉350036783
P粉350036783 2023-09-10 13:50:38
0
1
436

我有以下範例程式碼:

body { overflow: hidden; } #content { height: 200px; overflow-x: hidden; overflow-y: auto; outline: none; }

Bacon ipsum dolor amet capicola pig ribeye andouille. Brisket chuck ham biltong frankfurter landjaeger cupim kielbasa prosciutto. Capicola kevin chuck salami bacon. Shank t-bone strip steak shoulder tri-tip tenderloin turducken rump pork loin andouille fatback bacon chicken shankle ground round.

Brisket turducken beef ribs picanha shank ribeye shoulder, pig rump strip steak. Prosciutto tri-tip strip steak pork, swine pork chop sausage meatloaf cupim pancetta. Venison jowl sirloin pig cow, short ribs strip steak rump shankle meatball. Corned beef meatloaf short loin pork belly meatball swine, ham pancetta andouille sausage. Fatback short loin turducken pork loin, shank porchetta salami pork belly leberkas shankle picanha tenderloin doner ball tip. Spare ribs pastrami cow capicola sausage jowl shank ball tip kevin ham chuck short loin.

Ground round sausage filet mignon pastrami shank. Tenderloin t-bone drumstick ground round, bresaola rump pork chop alcatra kevin turducken turkey. Corned beef flank picanha beef chicken. Pork loin pastrami short loin meatball chicken sausage alcatra andouille venison.

Turkey alcatra pancetta spare ribs boudin filet mignon venison ball tip salami drumstick. Flank pastrami ball tip prosciutto bresaola, tenderloin beef ribs fatback beef brisket strip steak chicken biltong. Ham boudin pancetta, corned beef rump salami chicken drumstick. Picanha cow flank swine fatback, hamburger frankfurter shank meatloaf ham hock. Pastrami pancetta prosciutto shoulder. Filet mignon sausage jowl biltong tail pork turkey boudin tongue short loin meatball flank pork belly.

在具有文字的div中滾動時,有時候body div似乎也會滾動。如果我快速滾動到文字div的頂部,這種情況似乎會經常發生。

如何阻止這種行為?

P粉350036783
P粉350036783

全部回覆 (1)
P粉652495194

您可能還需要在html元素上隱藏溢出。特別是對於iOS/蘋果設備,我認為溢出滾動的問題發生在html元素上(現在無法測試)。

html, body { overflow: hidden; }
    最新下載
    更多>
    網站特效
    網站源碼
    網站素材
    前端模板
    關於我們 免責聲明 Sitemap
    PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!