Coder Social home page Coder Social logo

Comments (6)

jin-yufeng avatar jin-yufeng commented on May 13, 2024

提供一下html?

from mp-html.

W0916 avatar W0916 commented on May 13, 2024

html是从微信文章中获取的,太多了,链接发你,你那边能拉下来吗:链接:https://mp.weixin.qq.com/s/FGY35Eo47z_s7q7w-U6DzA

from mp-html.

jin-yufeng avatar jin-yufeng commented on May 13, 2024

好的我检查一下

from mp-html.

W0916 avatar W0916 commented on May 13, 2024

谢谢🙏 麻烦你了

from mp-html.

jin-yufeng avatar jin-yufeng commented on May 13, 2024

第一个换行的问题已经解决了,之后会更新
微信截图_20190924203548
第二个问题就比较神奇了,我把那一段html转成wxml也会这个样子,可能是小程序和html在处理这种flex布局中宽度超出后的方式不一样,反正只有rich-text能正常显示,用小程序的标签就不行(除非宽度足够),所以这个问题估计是无法解决
可以试一下下面这段:

<view style="padding: 5px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;">
  <view style="max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(203, 73, 55);overflow-wrap: break-word !important;">
    <view style="margin-top: 1em;padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;font-size: 16px;display: flex;justify-content: center;overflow-wrap: break-word !important;">
      <view class="" style="padding-right: 0.6em;padding-left: 0em;max-width: 100%;box-sizing: border-box;flex: 1 1 0%;overflow-wrap: break-word !important;">
        <image style="display: block;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 544.406px !important;height: auto !important;max-width: 100%;" src="https://mmbiz.qpic.cn/mmbiz_jpg/OJbGgjE2eLyaUEArjrf5O1pURO3jARJgSTgWWHpwsaYXVwOFT9L3klnWia314o4j7AYt1tLIvv8z4tLYEAED8Gw/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1"
          mode="widthFix" />
      </view>
      <view style="max-width: 100%;width: 45px;box-sizing: border-box !important;overflow-wrap: break-word !important;">
        <view style="margin-right: auto;margin-left: auto;max-width: 100%;width: 45px;box-sizing: border-box !important;overflow-wrap: break-word !important;">
          <image style="box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible !important; width: 45px !important; height: auto !important;" src="https://mmbiz.qpic.cn/mmbiz_png/7QRTvkK2qC4seCNwKcPxj9icd1jpKs0p0OR50qJQkcWzJlcbL4qSQKqT2ucq8LIDq0410yqAibd6nn1RDWxraNwA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1"
            mode="widthFix" />
        </view>
      </view>
    </view>
  </view>
</view>

在小程序里,是这样的
2
但是对应的html

<section style="padding: 5px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;">
    <section style="max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(203, 73, 55);overflow-wrap: break-word !important;">
      <section style="margin-top: 1em;padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;font-size: 16px;display: flex;justify-content: center;overflow-wrap: break-word !important;">
        <section class="" style="padding-right: 0.6em;padding-left: 0em;max-width: 100%;box-sizing: border-box;flex: 1 1 0%;overflow-wrap: break-word !important;">
          <img style="display: block;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 544.406px !important;height: auto !important;max-width: 100%;" src="https://mmbiz.qpic.cn/mmbiz_jpg/OJbGgjE2eLyaUEArjrf5O1pURO3jARJgSTgWWHpwsaYXVwOFT9L3klnWia314o4j7AYt1tLIvv8z4tLYEAED8Gw/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1"/>
        </section>
        <section style="max-width: 100%;width: 45px;box-sizing: border-box !important;overflow-wrap: break-word !important;">
          <section style="margin-right: auto;margin-left: auto;max-width: 100%;width: 45px;box-sizing: border-box !important;overflow-wrap: break-word !important;">
            <img style="box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible !important; width: 45px !important; height: auto !important;" src="https://mmbiz.qpic.cn/mmbiz_png/7QRTvkK2qC4seCNwKcPxj9icd1jpKs0p0OR50qJQkcWzJlcbL4qSQKqT2ucq8LIDq0410yqAibd6nn1RDWxraNwA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1"/>
          </section>
        </section>
      </section>
    </section>
  </section>

在浏览器里,是这样的
3

from mp-html.

jin-yufeng avatar jin-yufeng commented on May 13, 2024

那个被换行的问题现在的最新版已经解决啦

from mp-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.