• How to display different colors and fonts with label in IOS


    preface In IOS, label is a control that we often encounter. We should all simply use it. Like the following code, we can simply create a label //1. Create CGRectrect =CGRectMake(100,100,100,100); UILabel* label = [[UILabelalloc]initWithFrame:rect]; introduction However, in our development, we often encounter a line of words, but display different colors and fonts. We don’t […]

  • Introduction to the use of select optgroup tag in HTML


    Occasionally, we need to group the content of select, which used to be controlled by program. Today, we find that there is an optgroup attribute in select. It is tested to be suitable for browsers such as firebox and ie. At present, we find that the only disadvantage is that we can’t customize the title […]

  • Understanding of innerText, innerHTML and join methods of JavaScript built-in objects


    InnerText syntax specification:HTMLElement.innerText = string ; / / the following assignment is in the form of a string InnerText is a non-standard form that does not recognize HTML tags. The return value will remove spaces and wrap div.innerText = ‘123 ‘; / / the output on the page is123 ———————————————————————————————————————————————— InnerHTML syntax specification: Element.innerHTML =Htmlstring; / […]

  • Front end interview day 3 + 1 – 516


    Today’s knowledge point (September 13, 2020) – day 516(I’m going to ask questions, too) [html] Which tags can be placed in span tags in HTML? [css] What makes the position:fixed Change of positioning datum elements? [js] Suppose you want to deal with something before UI rendering, what do you do? [soft skills]If today is the […]

  • JSX and virtual DOM


    JSX is a kind of syntax sugar, which is compiled by BabelReact.createElement(component, props, …children)Function. for example const Element = ( <div className=”title”> Hello <span style={{fontSize:”20px”,color:”#f00″}}>World!</span> </div> ) After Babel compilation: const Element = React.createElement( ‘div’, { className: ‘title’, }, ‘Hello’, React.createElement( ‘span’, { style: { fontSize: ’20px’, color: ‘#f00’, }, }, ‘World!’ ) ); JSX […]

  • Set of Vue problems


    1. Configure the route by Vue router. When the current path is consistent with the jump path, an error will be reported. NavigationDuplicated: Avoided redundant navigation to current location: So modify and add in JS of router import Router from ‘vue-router’ //Modify the jump event of router and cancel the error prompt. const originalReplace = […]

  • Inline and inline block of CSS


    CSS inline、inline-block This article will introduce the layout of content and related principles in inline layout. Line box and line box For row box and inline box, there is a classic diagram in the standard document. Attached with a piece of code, easy to understand. <div style=”width: 200px; margin: auto;”> This is a piece of […]

  • Realization of picture download


    Several ways to download pictures Download automatically through browser. The browser receives the binary file and automatically transcodes and downloads it. For example: window.open () Download through XHR. Ajax requests are binary files, which can only be downloaded by manual transcoding. The first type: Browser automatic download type This requires the backend to configure response […]

  • Six long cherished idea tips, all of which will be shared with you!


    Weekly interest map Product manager design experience / user experience I won’t write any technical analysis articles this week. I’ll share some of the long cherished idea “Sao skills” to help you complete the code quickly. What are you waiting for? Get on the bus Praise first, then watch. Make a habit. Wechat search “Procedure […]

  • Django — template layer (front end and back end interactive coding, two methods used by Django template, variable of template syntax & deep query period, rendering template to label or original string, filter + custom, label + custom)


    1、 Front end and back end interactive coding mode 1 urlencoded — > transfers common data, which is the default form — > request.POST 2 form data — > transfer files and data — > request.POST request.FILES 3 JSON ——– transfer JSON format data — > request.body Take it out and handle it by yourself […]

  • Instruction of Vue


    Vue all instructions start with “V -“. V-html: similar to innerHTML in JS. You can parse the tags in the template. V-text: similar to innerText in JS. Output the data in the template as a string. Labels in the template are not resolved. Equivalent to {}: prevent {}} from appearing on the page during refresh […]