【问题标题】:How to insert an image in DHTMLx Touch如何在 DHTMLx Touch 中插入图像
【发布时间】:2012-01-13 05:51:35
【问题描述】:

我正在使用DHTMLx Touch online editor

我有一个包含 3 个单元格的布局

{ id: 'app', view: 'layout', height: 482, width: 322,
rows: [ { view: 'layout'
   , type: 'wide'
   , rows: [ { view: 'view', id: 'temp_designer_view_2'}
           , { view: 'view', id: 'temp_designer_view_3'}
           , { view: 'view', id: 'temp_designer_view_4'} ]
   , id: 'layout_2'} ] }

我想在第一个 id 为“temp_designer_view_2”的单元格中放置一张图片

【问题讨论】:

    标签: javascript html web-applications mobile-application dhtmlx


    【解决方案1】:

    最好使用“模板”视图将 HTML 内容包含到布局项中:

       { id: 'app', view: 'layout', height: 482, width: 322,
        rows: [ { view: 'layout'
           , type: 'wide'
           , rows: [ { template: "<div class='imgParent'><img .../></div>", id: 'temp_designer_view_2'}
                   , { template: '', id: 'temp_designer_view_3'}
                   , { template: '', id: 'temp_designer_view_4'} ]
           , id: 'layout_2'} ] }
    

    查看dhtmlxTouch包中的相关示例:../samples/technical/view/04_template.html 和../samples/technical/view/08_carousel.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-14
      • 2015-09-29
      • 2019-11-08
      • 2018-05-24
      • 1970-01-01
      • 1970-01-01
      • 2021-07-28
      相关资源
      最近更新 更多