Create a layout using CSS for later design

We are trying to execute the following layout based on the html dynamic line .

Here we come across when the layout of the contents of the second page does not rise, and we cannot add images to the first page.

I tried the sample code in my own code, as shown below:

 func setData(){

        let dic = arrayData[currentIndex]
        url = dic["ImageLink"] as! String
        self.url = self.url + "_MEDVPF.gif"
        content = dic["ArticleXML"] as! String

        let height = String(describing:webViewObj.frame.size.height - 100) + "px"
        let width = String(describing: self.view.frame.size.width / 3 - 20) + "px"

//        let style = "<div style=color:#0000FF>" + String(describing: dic["HeadLine"]!) + "<br /><br />" +  String(describing: dic["Abstract"]!) + "</div>"

        self.headlineLabel.text = dic["HeadLine"] as? String
        self.abstractLabel.text =  dic["Abstract"] as? String
        var styleCSS = "font-family: TAUN_Elango_Abirami; font-size: 18px; column-width: %@; column-gap: 10px; height:%@;>"
        styleCSS = String(format:styleCSS,width,height)

        let bodyStyle = "<div style= \"%@\""  + content + "</div>"
        let bodyStyleConten = String(format:bodyStyle,styleCSS)



        let htmlString =   String(format:bodyStyleConten)
        let finalDiv = "<div>" + htmlString + "</div>"
        webViewObj.loadHTMLString(finalDiv, baseURL: nil)

    }

enter image description here

How can I do this HTML5 with CSS, which should be horizontal scrolling?

We tried to use the main text in iOs, but we ran into the problem of slowness. So we decided to go with uiwebview ?

CoreText, - , . , lucks? , , , - .

+4
1

, , , , , : - . - , , , , : " , ?" : ", , , , ". , , - .

, . , ! https://stackoverflow.com/help/how-to-ask HTML/CSS/JS, , , .

HTML/CSS, overflow-x: scroll; , , CSS https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Columns/Using_multi-column_layouts, , , -.

0

Source: https://habr.com/ru/post/1672826/


All Articles