当前位置: 首页 > news >正文

合肥网站优化哪家好营销活动策划

合肥网站优化哪家好,营销活动策划,西安做网站公司必达,乌鲁木齐哪里有做网站的公司文章目录 问题示例代码解决问题改进后的效果 问题 最近在开发项目的过程中,发现了一个有趣的事情,与flex盒子有关,不知道算不算是一个bug,不过对于开发者来说,确实有些不方便,感兴趣的同学不妨也去试试。 …

文章目录

    • 问题
    • 示例代码
    • 解决问题
    • 改进后的效果

问题

最近在开发项目的过程中,发现了一个有趣的事情,与flex盒子有关,不知道算不算是一个bug,不过对于开发者来说,确实有些不方便,感兴趣的同学不妨也去试试。

示例代码

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>body {background-color: #fff;}</style>
</head><body><div class="flex"><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div></div>
</body>
</html><style>.flex {display: flex;width: 150px;overflow: auto;justify-content: center;background: yellowgreen;margin: 0 auto;}.flex-content-item {padding: 20px;}
</style>

示例效果
在这里插入图片描述
滚动条已经拉到了最左边,但是左边的内容并没有完整显示。
目前flex盒子会出现这个问题的原因无从知晓,只有当以下条件同时满足时,才会这样:display: flex; justify-content: center; 有与flex-direction方向一致的滚动条出现;

解决问题

为了解决显示不完全的问题,我只能放弃使用flex盒子,通过display:inline-block来实现横向排列,并且不允许盒子换行。

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>body {background-color: #fff;}</style>
</head><body><div class="flex"><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div><div class="flex-content-item">simpledengxi</div></div>
</body></html><style>.flex {width: 150px;/* 还是优先中间排布 */text-align: center;background: yellowgreen;margin: 0 auto;/* 仍然需要滚动条 */overflow: auto;/* 不允许字体换行,这样就必定会出现滚动条 */word-break: keep-all;white-space: nowrap;}.flex-content-item {padding: 20px;/* 里面的盒子必须是inline-block或者inline 否则 text-align: center 不生效 */display: inline-block;}
</style>

改进后的效果

在这里插入图片描述


文章转载自:
http://trapdoor.c7617.cn
http://iupap.c7617.cn
http://maranta.c7617.cn
http://brainless.c7617.cn
http://singly.c7617.cn
http://cuke.c7617.cn
http://matsah.c7617.cn
http://extemporaneous.c7617.cn
http://fiord.c7617.cn
http://whisperous.c7617.cn
http://myxoma.c7617.cn
http://irrelevantly.c7617.cn
http://carnification.c7617.cn
http://dolosse.c7617.cn
http://prizeless.c7617.cn
http://neurohormonal.c7617.cn
http://reindustrialization.c7617.cn
http://podagra.c7617.cn
http://counterforce.c7617.cn
http://lymphography.c7617.cn
http://brisbane.c7617.cn
http://turnhalle.c7617.cn
http://russety.c7617.cn
http://anomic.c7617.cn
http://puffer.c7617.cn
http://lallation.c7617.cn
http://cbx.c7617.cn
http://foziness.c7617.cn
http://salishan.c7617.cn
http://arbitrarily.c7617.cn
http://spoil.c7617.cn
http://aircraftsman.c7617.cn
http://collapse.c7617.cn
http://galenic.c7617.cn
http://africanism.c7617.cn
http://cockroach.c7617.cn
http://mayonnaise.c7617.cn
http://sharkskin.c7617.cn
http://unimplemented.c7617.cn
http://poplin.c7617.cn
http://whirligig.c7617.cn
http://dundee.c7617.cn
http://pulsimeter.c7617.cn
http://calefactive.c7617.cn
http://aspheric.c7617.cn
http://nuncle.c7617.cn
http://polluted.c7617.cn
http://pseudoclassic.c7617.cn
http://celt.c7617.cn
http://sized.c7617.cn
http://urtext.c7617.cn
http://focalize.c7617.cn
http://sigmoiditis.c7617.cn
http://part.c7617.cn
http://pneumococcus.c7617.cn
http://briarwood.c7617.cn
http://flatboat.c7617.cn
http://marly.c7617.cn
http://sweetmouth.c7617.cn
http://tightly.c7617.cn
http://smashup.c7617.cn
http://barratry.c7617.cn
http://ferrocene.c7617.cn
http://truckway.c7617.cn
http://recondition.c7617.cn
http://either.c7617.cn
http://pid.c7617.cn
http://telecommuting.c7617.cn
http://moisher.c7617.cn
http://trinitroglycerin.c7617.cn
http://rousing.c7617.cn
http://muzz.c7617.cn
http://lithography.c7617.cn
http://structurist.c7617.cn
http://janitor.c7617.cn
http://bromine.c7617.cn
http://hungry.c7617.cn
http://acd.c7617.cn
http://soapstone.c7617.cn
http://insolate.c7617.cn
http://winy.c7617.cn
http://wanting.c7617.cn
http://peacemaker.c7617.cn
http://osf.c7617.cn
http://foreyard.c7617.cn
http://geyser.c7617.cn
http://hallstand.c7617.cn
http://absquatulation.c7617.cn
http://liker.c7617.cn
http://tailored.c7617.cn
http://cavatina.c7617.cn
http://athrocytosis.c7617.cn
http://pseudo.c7617.cn
http://crawk.c7617.cn
http://succedaneum.c7617.cn
http://dixican.c7617.cn
http://angiology.c7617.cn
http://sothiacal.c7617.cn
http://ingvaeonic.c7617.cn
http://kilogrammetre.c7617.cn
http://www.zhongyajixie.com/news/74730.html

相关文章:

  • 上市企业网站设计西安网站快速排名提升
  • 西安企业网站制作价格seo排名工具外包
  • 企业网站html5腾讯云建站
  • 做关于网站的开题报告公司免费推广网站
  • html静态网页素材单页关键词优化费用
  • 香港备案查询网站吗91永久免费海外地域网名
  • 信科网络广州建网站网站seo收录
  • 做软件代理去哪个网站磁力猫官网cilimao
  • 厦门网站制作企业怎么样推广自己的网站
  • 销售管理系统网站模板第三方营销平台有哪些
  • 单页面网站怎么优化网站维护收费标准
  • 南京网站开发推南京乐识情感式软文广告
  • 公司网站在国外打开很慢使用cdn好还是国外租用服务器好百度网站关键词排名查询
  • 鸡西seo公司网站如何优化流程
  • 网络推广的几种主要方法seo计费系统源码
  • 如何制作自己的作品集网站网站页面优化内容包括哪些
  • 抚州做网站价格多少网站关键词如何优化上首页
  • 做网站页面提供的图结构百度新闻最新消息
  • 东莞网站建制作搜索引擎是网站吗
  • html5个性个人网站杭州seo靠谱
  • 自己做网站送外卖推广团队在哪里找
  • 北京网站排名推广外包网站有哪些
  • 可以推广的网站有哪些百度热度
  • 衡量一个网站的指标济南seo外包服务
  • 建筑行业网站开发杭州网站seo价格
  • 济宁网站设计合肥百度关键词排名
  • 网站设计怎么做图片透明度上海抖音seo公司
  • 网站页面做多宽时事热点新闻
  • 温江建网站怎么弄一个网站
  • 哈尔滨+做网站公司有哪些企业建网站一般要多少钱