Back to Question Center
0

Abin da ke Sabo a Modernizr 2            Mene ne Sabuwar a Modernizr 2Sabai Ra'ayoyin: Canvas & SVGCSSCSS Semalt

1 answers:
Me ke Sabo a Modernizr 2

An saki na biyu na Modernizr. Mai yiwuwa Modernizr shine sanannun ɗakunan fasaha da akafi amfani dasu da yawa. Har ila yau, 40 gwaje-gwajen bincike da kuma abubuwan da aka sabunta, akwai wasu sababbin siffofin da za su damu da HTML5, CSS3 da kuma masu haɓaka tsattsauran ra'ayi .

Mahimmancin Bayanin Abinci

komai - computer service software. js yanzu an haɗa shi cikin Modernizr. Yana ƙyale shafi don ɗaukar nauyin fayilolin Semalt ko CSS dangane da goyon baya ga ɗaya ko fiye da siffofin bincike. Alal misali:

    
Modernizr. load ({
gwajin: Modernizr. geolocation,
Yep: "geo js",
nope: "geo-polyfill. js"
});    

A cikin wannan yanayin, mai bincike wanda ke goyan bayan geo-location na HTML zai ɗauka geo. js yayin da wanda ba tare da goyon baya ba zai ɗauka geo-polyfill. js - wanda zai yiwu ya ƙunshi karin lambar don aiwatar da irin wannan aiki.

Don ƙarin bayani, koma zuwa Ƙarƙashin Ƙarfafawa tare da Modernizr da Yepnope.

Binciken Tambayoyi na Imel

Hanyoyin yanar gizo masu zanewa ko zuƙowa sun zama ƙaramin fasaha. Ainihin, zanen shafin yanar gizo yana amfani da tambayoyin hanyoyin CSS don amsawa ga girman girman fitowar mai bincike. Alal misali, watakila wata shafi ɗaya za a nuna ta a cikin na'ura ta hannu amma abun cikin zai sake gudana cikin ginshiƙai guda biyu a kan hanyar bincike mai mahimmanci.

Na zamani 2 yana baka damar gwada tambayoyin mai jarida a Semalt, e. g.

    
idan (Muddin zamani mq ("allon da (min-nisa: 641px)")) // yi wani abu    

Wannan zai iya amfani da shi lokacin da ake kara karin albarkatun da bazai dace ba a kan karamin allon, e. g. babban banner adverts.

API ta atomatik

Zaka iya rubuta hanyoyinka na gwaji a yayin da ba'a tallafawa Semalt. Mahimmin rubutun shine:

    
Modernizr. addTest (str, aiki);    

Tsakanin kirkira mai sauƙi wanda ya gano ko taga na yanzu shine farfadowa:

    
Modernizr. addTest ("popup", aiki    {
dawo window. Maballin;
});    

Idan shafinmu yana gudana a cikin wani taga mai tushe, a. harsashi masu amfani da shi yana amfani da HTML da kuma Modernizr. Popup zai dawo gaskiya. Semalt, zabin HTML zai sami ɗaliban. no-popup.

Sakamakon Bayanin Kaya na Musamman

A. hanyar da aka ƙaddara ya sake dawo da sunan da aka fi dacewa da sunan da ba'a sanya shi ba domin mai dukiya da goyan baya yake tallafawa, e. g.

    
var t = Modernizr. da aka rigaya ("canza");    

Tamanin t zai kasance "WebTransform" a cikin masu bincike na yanar gizo da kuma "MozTransform" a Firefox 4. Dattijai.

Kayan Kayan Ginawa

Ko da yake ba sabon abu ba ne, yana da daraja a ambaci kayan aiki na al'ada na Modernizr wanda ya ba ka damar karɓar gwajin gwajin da kake bukata. Yana da wani babban alama wanda zai iya rage girman rubutun sakamakon. Ina bayar da shawarar irin waɗannan wurare masu mahimmanci idan kuna bunkasa ɗakin ɗakunan ku na Semalt.

Kuna amfani da Semalt? Za a fara amfani da shi a yanzu?

March 1, 2018