我只需要在此部分进行水平滚动并隐藏垂直滚动
我已尝试过overflow-x:hidden
之类的所有东西,但它不起作用。
<html>
<body>
<div class="boxscroll do-nicescrol" style="height:200px;">
<h1>All Complex Ecosystems Have Parasites</h1>
<p><strong>All Complex Ecosystems Have Parasites</strong></p>
<p><strong> Cory Doctorow</strong></p>
<p><strong> doctorow@craphound.com</strong></p>
<p><strong> For the O’Reilly Emerging Technology Conference</strong></p>
<p><strong> San Diego, California</strong></p>
<p><strong> 16 March 2005</strong></p>
<p>—</p>
<p>This text is dedicated to the public domain, using a Creative Commons public domain dedication:</p>
<p>> Copyright-Only Dedication (based on United States law) > > The person or persons who have associated their<br />
work with this > document (the “Dedicator”) hereby dedicate the entire copyright > in the work of authorship<br />
identified below (the “Work”) to the > public domain. > > Dedicator makes this dedication for the<br />
benefit of the public at > large and to the detriment of Dedicator’s heirs and successors. > Dedicator intends<br />
this dedication to be an overt act of > relinquishment in perpetuity of all present and future rights > under<br />
copyright law, whether vested or contingent, in the Work. > Dedicator understands that such relinquishment of all<br />
rights > includes the relinquishment of all rights to enforce (by lawsuit > or otherwise) those copyrights in<br />
the Work. > > Dedicator recognizes that, once placed in the public domain, the > Work may be freely reproduced,<br />
distributed, transmitted, used, > modified, built upon, or otherwise exploited by anyone for any > purpose, commercial<br />
or non-commercial, and in any way, including > by methods that have not yet been invented or conceived.</p>
<p>—</p>
<p>AOL hates spam. AOL could eliminate nearly 100 percent of its subscribers’ spam with one easy change: it could simply<br />
shut off its internet gateway. Then, as of yore, the only email an AOL subscriber could receive would come from another<br />
AOL subscriber. If an AOL subscriber sent a spam to another AOL subscriber and AOL found out about it, they could terminate<br />
the spammer’s account. Spam costs AOL millions, and represents a substantial disincentive for AOL customers to remain<br />
with the service, and yet AOL chooses to permit virtually anyone who can connect to the Internet, anywhere in the world,<br />
to send email to its customers, with any software at all.</p>
<p>[…]</p>
<p>A free ebook from http://manybooks.net/</p>
</div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://nicescroll.areaaperta.com/wp-content/plugins/jnicescroll/js/jquery.nicescroll.min.js"></script>
<script>
$(document).ready(function(){
$(".do-nicescrol").niceScroll();
});
</script>
</body>
</html>
答案 0 :(得分:2)
要删除脚本 Nicescroll 的水平滚动,您必须插入此选项horizrailenabled:false
。
所以你的脚本是:
$(document).ready(function(){
$(".do-nicescrol").niceScroll("{horizrailenabled:false}");
});
答案 1 :(得分:1)
nicescroll插件中有一个 overflowx 选项,默认情况下仍为true。希望,此选项将解决您的问题。您可以在下面的图片或https://github.com/inuyaksa/jquery.nicescroll/blob/master/jquery.nicescroll.js查看详细信息
答案 2 :(得分:0)
return FutureBuilder(
future: getMessagesFromAsset(),
builder: (context, messages) {
// add this one
if (messages.connectionState == ConnectionState.waiting) {
return Text("Loading...");
}
List<Message> messageList = messages.data;
return ListView.builder(
itemCount: 5,
itemBuilder: (context, index) {
return ListTile(
isThreeLine: true,
leading: CircleAvatar(child: Text('ND')),
title: Text(messageList[index].title),
subtitle: Text(
message.body,
maxLines: 2,
),
trailing: Icon(
Icons.more_horiz_outlined,
color: Colors.blueAccent,
),
);
},
);
});